Add main method.