get the global settings db stuff working, little sqlite tweaks