pass along sqlite object so it's clear who uses it, tweak queries
convert export_nicks() and import_nicks() to sqlite