Moved random md5 hash creation to db.js'