vanilla javascript and removal of more mootools dependencies