Fixed category count on results page
Code restructuring on results page