Refactor category selection