Cleans up files, modifies to fix bugs in templates.