move middleware to its own folder in app/
consolidate app env settings to app/settings
move all maxage settings to app/settings