Simplify the source code by using some ES6 features such as arrow functions to avoid the use of 'var self = this', the shorthand for method definitions in object initializers.