Refactored Controller::Edit with proper chaining and fixed tests