Moving to use when.js rather than built in Promises

Since Promises are not supported on other platforms besides chrome
WIP - adding lint'ing