Changes to use SQLite