Refactored factory classes, added registration methods to factory.h