Added a main method.