Minor refector to avoid global @agent
refactor JS and fix scheduling clearing bug
application.js no longer needs to be erb
Merge pull request #512 from cantino/fix_schedule_reset

Fix schedule reset AKA refactor all the JavaScript!