Refactor main form to partial classes