The first NUnit test for code generation and some minor refactoring.