Added a helper routine for assertions. Also included a reference to the _q promise framework