Remove some factory classes and rework code to accomodate changes