Refactored main method.