Refactor into partials
Add control for categories