Added ability to search by category
Fixed logic error with checking result limit