refactored: ApplicationContext to BeanFactory