cleaning up some db stuff