Cleanup old sqlite3-based code