Fix the build/factories

Breakage in build caused by factory issue. 

That issue and others that have been bugging me about factories fixed herein.