using vanilla js for OOP instead of mootools.