Trying my hand at a promise implementation.