Problem fixed - exports in db.js