move classes.js to util/database.js