Refactor categories list call to use single SQL query.
Refactored and cleaned up cat subcat filter js. Most edge cases covered now.