added category and refactored errors to partials