Refactor category to a seperate object