Added JSON course search and proper internal JSON encoding.