Moving app object into its own definition