Cleanup search_history()
More accurate get_timestamp()