Added ServerMain and some comments.