Moving back to one js file due to Moodle "bug"