Made Q global.
Made Q global work this time.
Made DB funcitons return promises.