Refactored MainWindow edit methods