Cleanup app structure and make regular rake tasks work.