Moved code for passing SQL to SQLite into it's own method. Close #43