Refactored server code to initilize connection from a function seperate
of main.  Created first connection test to verify connection to the DB
is established.