Finished basic promise implementation