Remove unneeeded files.
Fix problems with application templates.