Add possibility to register object factories (lazy loading), minor cosmetics