Adding Q for Javascript promises