Enhanced search

This PR enhances the search functionality quite a bit. 
- make the search case insensitive
- include category in matching the filter
- refactored and documented the matching