Categorisation refactor