Feature/factories

Second attempt to get factories in