Sample code for UISearchController + cleaned up code