Refactoring

@Ian-Stewart-Binks Okay I'm done working on this for this week. If you get a chance, please go through the code and test out the website to catch any bugs. Otherwise we can talk about this more when we next meet.

Unfortunately the diffs don't paint a clear picture, but hopefully you'll recognize how I moved the code around. In particular, most of mouse events is now in either course.js or section.js.

Hopefully this doesn't hinder your progress on the generate-grid too much!