Refactor render code into SemSyn.renderCode