Cleaning up documentation. Fixing a few bugs in the generator.