Refactor backpack controller and view for working with category-directive