code style stuff

Removed all Promise.resolve/Promise.reject and changed to just return/throw.

Also changed _.each to _.forEach to match ES5 and lo-dash. (in lo-dash, each is an alias for forEach)