Simplify main method.