made Server an object to invoke main method from command line