refactor categories
Add categories tests
Merge pull request #19 from crowdint/feature/refactor-categories

refactor categories