Database connection now working properly.  Further refactoring and breaking down of methods.