move search saving out of html into SavedSearches class