Refactor category type