refactored buildingType.js to make it less confusing.