Many small changes
added implementation of a Promise