code cleanup

- removed legacy code relating to sqlite3
- removed other unused functions