Cleaning up SQLite escape code