Refactor categorization method for building class