SQLite refactor now working for new tables