Base code for course search view controller