Initial implementation… needs refactoring (to add setBeanFactory)