More main reduction, reducing code for testability