Changes: setImmediate and fullfill some promises