Refactor BeanDefinitionParser