Update Category.php

refactored and recommented