Connect to Database

Needs some tweaking