Abstract common app code

@lingyan @redonkulus @vijar
Where is `App.Context` defined?