events: change to es6 syntax
base object: change to es6 syntax
main: change to es6 syntax