added db stuff
cleaned up some exception handling
cleaned up some exception handling
added postgres driver