Refactored MainWindow to derive from IMainWindow rather than implement a field deriving from this interface.