Fix an MSIE crash, also fix an incorrectly placed if statement.
Fix some bugs.
Bugfixes.
Small tweaks
Merge remote-tracking branch 'origin/rewrite'

Conflicts:
	timetable.css
	timetable.html
	timetable.js
	tt-helper.js
Merge pull request #4 from keepcalm444/master

Rewrite