Moving app variables into app context