Split CreateBuilding() function