Even DRYer

Now there is only one method that generates code.