Rewritten to use prototype and std Promise

Rewritten to use prototyped methods on all classes as well as Ecmascript
6 and A+ compliant promise implementation from promise-light
(https://github.com/taylorhakes/promise-light) by
https://github.com/taylorhakes. Not tested.