Implemented Promises

This `this` is inside the resolving algorithm, be careful.