[mean-generator] this resolves to global object in promises #4
(plus some formatting improvements)