A simple Promises/A+ implementation.