Improved mysql class and added primitive autosuggest to search by search history