Create factory.cpp