Began adapting code to ECMAScript 6