Added lib/database.js