refactor sqlite_utils.h/.c