The engine should be rewritten in ES6 (ES2015). Then we don't have to implement our own extend and clone methods