Added handling for subcategories and maxprice