Actually merged Chris's sqlite edits.