Changed database to use SQLite completely.