Fix warnings on startup + add more TODO
Remove usage of potentially unsafe SQL constructs
Actually this isn't really user facing, and probably isn't called with user-facing code so it's probably not an issue, but it's a pretty straightforward fix AFAIK.
Remove usage of potentially unsafe SQL constructs