Changed code so that the information needed to connect to the database is passed to it by the server class