Writing the right Main class.