Minor SQL enhancements, plus fixed the config saving, plus removed nasty ping.