Beginning a move to a better design

Im deciding to move the design of this project from one with a separate
function for each instruction, to one with some generalised emit
functions. This change will aid code maintainability.