Updated Client/Server classes.

Modularized main() to distinct methods.