Port to use SQLite instead of MongoDB