Added some smarter category and subcategory database searching. Tied it to the homepage as well.