Continued refactoring of the ApplicationContext class.