Changed MainFormController to an Unmanaged class.