Added a bean factory