fixes and enable es6 support