Did some work on converting the Database to use SQLite logic