style fixes, update to ES6 idioms