index.js purged of database calls. Now works