Cleaning up generated files. Small tweaks to smelly code.