CC @cstenkes See #104, #102. This is the frame issue to work on improving the quality of the generated code.