Fixes to tests generator, documentation.

I was just going to wait until I moved all this out to a yeoman generator at some point but fair enough, done!