Added some DB connect functionality