Minor cleanups to make code more ES6-like