Refactor application, context and config to provide access to app & config when having only context.