Refactor to use ES6 fat arrow + lexical this.

Resolves #247