moved the category queries to pre-compiled prepared statements...thread safety FTW