major js changes

separated js into separate files
course searching and adding works