Refactored into app object