Improved DB connect; updated other files as needed