rm rand, fix logs, and move db.js