Added seperate connection classes for database and server, added user writer