My implementation of Promises/A+, not fully completed.