Fixes for course search query
Fixes for update script
Optimizations