Bunch of small changes to the generator to make it nicer to use.