Added mechanism to auto-configure for postgresql and mysql and cleaned up couple bits of extraneous code