Changed main method.