Remove unused BeanFactory