Refactored JS DataTable and cleaned code for Category Management. Added docblocks to methods in controller and model.