Merged in refactor-sqlite3-calls. Can refactor in small steps from here on out