Additional testing, refactoring, and added ObjectFactory.