Moved database.js to logic directory.