Index: /trunk/src/VBox/Main/include/AutoStateDep.h
===================================================================
--- /trunk/src/VBox/Main/include/AutoStateDep.h	(revision 51497)
+++ /trunk/src/VBox/Main/include/AutoStateDep.h	(revision 51498)
@@ -10,5 +10,5 @@
 
 /*
- * Copyright (C) 2006-2010 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -58,5 +58,5 @@
         {
             Assert(aThat);
-            mRC = aThat->addStateDependency(taDepType, &mMachineState,
+            mRC = aThat->i_addStateDependency(taDepType, &mMachineState,
                                             &mRegistered);
         }
@@ -64,5 +64,5 @@
         {
             if (SUCCEEDED(mRC))
-                mThat->releaseStateDependency();
+                mThat->i_releaseStateDependency();
         }
 
@@ -72,5 +72,5 @@
         {
             AssertReturnVoid(SUCCEEDED(mRC));
-            mThat->releaseStateDependency();
+            mThat->i_releaseStateDependency();
             mRC = E_FAIL;
         }
@@ -82,5 +82,5 @@
         {
             AssertReturnVoid(!SUCCEEDED(mRC));
-            mRC = mThat->addStateDependency(taDepType, &mMachineState,
+            mRC = mThat->i_addStateDependency(taDepType, &mMachineState,
                                             &mRegistered);
         }
Index: /trunk/src/VBox/Main/include/MachineImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/MachineImpl.h	(revision 51497)
+++ /trunk/src/VBox/Main/include/MachineImpl.h	(revision 51498)
@@ -53,4 +53,6 @@
 #include <vector>
 
+#include "MachineWrap.h"
+
 // defines
 ////////////////////////////////////////////////////////////////////////////////
@@ -86,10 +88,8 @@
 // Machine class
 ////////////////////////////////////////////////////////////////////////////////
-
+//
 class ATL_NO_VTABLE Machine :
-    public VirtualBoxBase,
-    VBOX_SCRIPTABLE_IMPL(IMachine)
+    public MachineWrap
 {
-    Q_OBJECT
 
 public:
@@ -340,14 +340,4 @@
     };
 
-    VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Machine, IMachine)
-
-    DECLARE_NOT_AGGREGATABLE(Machine)
-
-    DECLARE_PROTECT_FINAL_CONSTRUCT()
-
-    BEGIN_COM_MAP(Machine)
-        VBOX_DEFAULT_INTERFACE_ENTRIES(IMachine)
-    END_COM_MAP()
-
     DECLARE_EMPTY_CTOR_DTOR(Machine)
 
@@ -381,5 +371,5 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
     // Needed from VirtualBox, for the delayed metrics cleanup.
-    void unregisterMetrics(PerformanceCollector *aCollector, Machine *aMachine);
+    void i_unregisterMetrics(PerformanceCollector *aCollector, Machine *aMachine);
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
 
@@ -388,239 +378,19 @@
                      const Utf8Str &strConfigFile);
     HRESULT initDataAndChildObjects();
-    HRESULT registeredInit();
-    HRESULT tryCreateMachineConfigFile(bool fForceOverwrite);
+    HRESULT i_registeredInit();
+    HRESULT i_tryCreateMachineConfigFile(bool fForceOverwrite);
     void uninitDataAndChildObjects();
 
 public:
-    // IMachine properties
-    STDMETHOD(COMGETTER(Parent))(IVirtualBox **aParent);
-    STDMETHOD(COMGETTER(Accessible))(BOOL *aAccessible);
-    STDMETHOD(COMGETTER(AccessError))(IVirtualBoxErrorInfo **aAccessError);
-    STDMETHOD(COMGETTER(Name))(BSTR *aName);
-    STDMETHOD(COMSETTER(Name))(IN_BSTR aName);
-    STDMETHOD(COMGETTER(Description))(BSTR *aDescription);
-    STDMETHOD(COMSETTER(Description))(IN_BSTR aDescription);
-    STDMETHOD(COMGETTER(Id))(BSTR *aId);
-    STDMETHOD(COMGETTER(Groups))(ComSafeArrayOut(BSTR, aGroups));
-    STDMETHOD(COMSETTER(Groups))(ComSafeArrayIn(IN_BSTR, aGroups));
-    STDMETHOD(COMGETTER(OSTypeId))(BSTR *aOSTypeId);
-    STDMETHOD(COMSETTER(OSTypeId))(IN_BSTR aOSTypeId);
-    STDMETHOD(COMGETTER(HardwareVersion))(BSTR *aVersion);
-    STDMETHOD(COMSETTER(HardwareVersion))(IN_BSTR aVersion);
-    STDMETHOD(COMGETTER(HardwareUUID))(BSTR *aUUID);
-    STDMETHOD(COMSETTER(HardwareUUID))(IN_BSTR aUUID);
-    STDMETHOD(COMGETTER(MemorySize))(ULONG *memorySize);
-    STDMETHOD(COMSETTER(MemorySize))(ULONG memorySize);
-    STDMETHOD(COMGETTER(CPUCount))(ULONG *cpuCount);
-    STDMETHOD(COMSETTER(CPUCount))(ULONG cpuCount);
-    STDMETHOD(COMGETTER(CPUHotPlugEnabled))(BOOL *enabled);
-    STDMETHOD(COMSETTER(CPUHotPlugEnabled))(BOOL enabled);
-    STDMETHOD(COMGETTER(CPUExecutionCap))(ULONG *aExecutionCap);
-    STDMETHOD(COMSETTER(CPUExecutionCap))(ULONG aExecutionCap);
-    STDMETHOD(COMGETTER(EmulatedUSBCardReaderEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(EmulatedUSBCardReaderEnabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(HPETEnabled))(BOOL *enabled);
-    STDMETHOD(COMSETTER(HPETEnabled))(BOOL enabled);
-    STDMETHOD(COMGETTER(MemoryBalloonSize))(ULONG *memoryBalloonSize);
-    STDMETHOD(COMSETTER(MemoryBalloonSize))(ULONG memoryBalloonSize);
-    STDMETHOD(COMGETTER(PageFusionEnabled))(BOOL *enabled);
-    STDMETHOD(COMSETTER(PageFusionEnabled))(BOOL enabled);
-    STDMETHOD(COMGETTER(GraphicsControllerType))(GraphicsControllerType_T *aGraphicsController);
-    STDMETHOD(COMSETTER(GraphicsControllerType))(GraphicsControllerType_T aGraphicsController);
-    STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize);
-    STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize);
-    STDMETHOD(COMGETTER(Accelerate3DEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(Accelerate2DVideoEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount);
-    STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount);
-    STDMETHOD(COMGETTER(VideoCaptureEnabled))(BOOL *u8VideoRecEnabled);
-    STDMETHOD(COMSETTER(VideoCaptureEnabled))(BOOL  u8VideoRecEnabled);
-    STDMETHOD(COMGETTER(VideoCaptureScreens))(ComSafeArrayOut(BOOL, aScreens));
-    STDMETHOD(COMSETTER(VideoCaptureScreens))(ComSafeArrayIn(BOOL, aScreens));
-    STDMETHOD(COMGETTER(VideoCaptureFile))(BSTR * ppChVideoRecFilename);
-    STDMETHOD(COMSETTER(VideoCaptureFile))(IN_BSTR pChVideoRecFilename);
-    STDMETHOD(COMGETTER(VideoCaptureWidth))(ULONG *aHorzRes);
-    STDMETHOD(COMSETTER(VideoCaptureWidth))(ULONG aorzRes);
-    STDMETHOD(COMGETTER(VideoCaptureHeight))(ULONG *aVertRes);
-    STDMETHOD(COMSETTER(VideoCaptureHeight))(ULONG aVertRes);
-    STDMETHOD(COMGETTER(VideoCaptureRate))(ULONG *aRate);
-    STDMETHOD(COMSETTER(VideoCaptureRate))(ULONG aRate);
-    STDMETHOD(COMGETTER(VideoCaptureFPS))(ULONG *aFPS);
-    STDMETHOD(COMSETTER(VideoCaptureFPS))(ULONG aFPS);
-    STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
-    STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
-    STDMETHOD(COMSETTER(SnapshotFolder))(IN_BSTR aSavedStateFolder);
-    STDMETHOD(COMGETTER(MediumAttachments))(ComSafeArrayOut(IMediumAttachment *, aAttachments));
-    STDMETHOD(COMGETTER(VRDEServer))(IVRDEServer **vrdeServer);
-    STDMETHOD(COMGETTER(AudioAdapter))(IAudioAdapter **audioAdapter);
-    STDMETHOD(COMGETTER(USBControllers))(ComSafeArrayOut(IUSBController *, aUSBControllers));
-    STDMETHOD(COMGETTER(USBDeviceFilters))(IUSBDeviceFilters * *aUSBDeviceFilters);
-    STDMETHOD(COMGETTER(SettingsFilePath))(BSTR *aFilePath);
-    STDMETHOD(COMGETTER(SettingsModified))(BOOL *aModified);
-    STDMETHOD(COMGETTER(SessionState))(SessionState_T *aSessionState);
-    STDMETHOD(COMGETTER(SessionType))(BSTR *aSessionType);
-    STDMETHOD(COMGETTER(SessionPID))(ULONG *aSessionPID);
-    STDMETHOD(COMGETTER(State))(MachineState_T *machineState);
-    STDMETHOD(COMGETTER(LastStateChange))(LONG64 *aLastStateChange);
-    STDMETHOD(COMGETTER(StateFilePath))(BSTR *aStateFilePath);
-    STDMETHOD(COMGETTER(LogFolder))(BSTR *aLogFolder);
-    STDMETHOD(COMGETTER(CurrentSnapshot))(ISnapshot **aCurrentSnapshot);
-    STDMETHOD(COMGETTER(SnapshotCount))(ULONG *aSnapshotCount);
-    STDMETHOD(COMGETTER(CurrentStateModified))(BOOL *aCurrentStateModified);
-    STDMETHOD(COMGETTER(SharedFolders))(ComSafeArrayOut(ISharedFolder *, aSharedFolders));
-    STDMETHOD(COMGETTER(ClipboardMode))(ClipboardMode_T *aClipboardMode);
-    STDMETHOD(COMSETTER(ClipboardMode))(ClipboardMode_T aClipboardMode);
-    STDMETHOD(COMGETTER(DnDMode))(DnDMode_T *aDnDMode);
-    STDMETHOD(COMSETTER(DnDMode))(DnDMode_T aDnDMode);
-    STDMETHOD(COMGETTER(GuestPropertyNotificationPatterns))(BSTR *aPattern);
-    STDMETHOD(COMSETTER(GuestPropertyNotificationPatterns))(IN_BSTR aPattern);
-    STDMETHOD(COMGETTER(StorageControllers))(ComSafeArrayOut(IStorageController *, aStorageControllers));
-    STDMETHOD(COMGETTER(TeleporterEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(TeleporterEnabled))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(TeleporterPort))(ULONG *aPort);
-    STDMETHOD(COMSETTER(TeleporterPort))(ULONG aPort);
-    STDMETHOD(COMGETTER(TeleporterAddress))(BSTR *aAddress);
-    STDMETHOD(COMSETTER(TeleporterAddress))(IN_BSTR aAddress);
-    STDMETHOD(COMGETTER(TeleporterPassword))(BSTR *aPassword);
-    STDMETHOD(COMSETTER(TeleporterPassword))(IN_BSTR aPassword);
-    STDMETHOD(COMGETTER(FaultToleranceState))(FaultToleranceState_T *aEnabled);
-    STDMETHOD(COMSETTER(FaultToleranceState))(FaultToleranceState_T aEnabled);
-    STDMETHOD(COMGETTER(FaultToleranceAddress))(BSTR *aAddress);
-    STDMETHOD(COMSETTER(FaultToleranceAddress))(IN_BSTR aAddress);
-    STDMETHOD(COMGETTER(FaultTolerancePort))(ULONG *aPort);
-    STDMETHOD(COMSETTER(FaultTolerancePort))(ULONG aPort);
-    STDMETHOD(COMGETTER(FaultTolerancePassword))(BSTR *aPassword);
-    STDMETHOD(COMSETTER(FaultTolerancePassword))(IN_BSTR aPassword);
-    STDMETHOD(COMGETTER(FaultToleranceSyncInterval))(ULONG *aInterval);
-    STDMETHOD(COMSETTER(FaultToleranceSyncInterval))(ULONG aInterval);
-    STDMETHOD(COMGETTER(RTCUseUTC))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(RTCUseUTC))(BOOL aEnabled);
-    STDMETHOD(COMGETTER(FirmwareType))(FirmwareType_T *aFirmware);
-    STDMETHOD(COMSETTER(FirmwareType))(FirmwareType_T  aFirmware);
-    STDMETHOD(COMGETTER(KeyboardHIDType))(KeyboardHIDType_T *aKeyboardHIDType);
-    STDMETHOD(COMSETTER(KeyboardHIDType))(KeyboardHIDType_T  aKeyboardHIDType);
-    STDMETHOD(COMGETTER(PointingHIDType))(PointingHIDType_T *aPointingHIDType);
-    STDMETHOD(COMSETTER(PointingHIDType))(PointingHIDType_T  aPointingHIDType);
-    STDMETHOD(COMGETTER(ChipsetType))(ChipsetType_T *aChipsetType);
-    STDMETHOD(COMSETTER(ChipsetType))(ChipsetType_T  aChipsetType);
-    STDMETHOD(COMGETTER(ParavirtProvider))(ParavirtProvider_T *aParavirtProvider);
-    STDMETHOD(COMSETTER(ParavirtProvider))(ParavirtProvider_T  aParavirtProvider);
-    STDMETHOD(COMGETTER(IOCacheEnabled))(BOOL *aEnabled);
-    STDMETHOD(COMSETTER(IOCacheEnabled))(BOOL  aEnabled);
-    STDMETHOD(COMGETTER(IOCacheSize))(ULONG *aIOCacheSize);
-    STDMETHOD(COMSETTER(IOCacheSize))(ULONG  aIOCacheSize);
-    STDMETHOD(COMGETTER(PCIDeviceAssignments))(ComSafeArrayOut(IPCIDeviceAttachment *, aAssignments));
-    STDMETHOD(COMGETTER(BandwidthControl))(IBandwidthControl **aBandwidthControl);
-    STDMETHOD(COMGETTER(TracingEnabled))(BOOL *pfEnabled);
-    STDMETHOD(COMSETTER(TracingEnabled))(BOOL fEnabled);
-    STDMETHOD(COMGETTER(TracingConfig))(BSTR *pbstrConfig);
-    STDMETHOD(COMSETTER(TracingConfig))(IN_BSTR bstrConfig);
-    STDMETHOD(COMGETTER(AllowTracingToAccessVM))(BOOL *pfAllow);
-    STDMETHOD(COMSETTER(AllowTracingToAccessVM))(BOOL fAllow);
-    STDMETHOD(COMGETTER(AutostartEnabled))(BOOL *pfEnabled);
-    STDMETHOD(COMSETTER(AutostartEnabled))(BOOL fEnabled);
-    STDMETHOD(COMGETTER(AutostartDelay))(ULONG *puDelay);
-    STDMETHOD(COMSETTER(AutostartDelay))(ULONG uDelay);
-    STDMETHOD(COMGETTER(AutostopType))(AutostopType_T *penmAutostopType);
-    STDMETHOD(COMSETTER(AutostopType))(AutostopType_T enmAutostopType);
-    STDMETHOD(COMGETTER(DefaultFrontend))(BSTR *aDefaultFrontend);
-    STDMETHOD(COMSETTER(DefaultFrontend))(IN_BSTR aDefaultFrontend);
-    STDMETHOD(COMGETTER(Icon))(ComSafeArrayOut(BYTE, aIcon));
-    STDMETHOD(COMSETTER(Icon))(ComSafeArrayIn(BYTE, aIcon));
-    STDMETHOD(COMGETTER(USBProxyAvailable))(BOOL *aAvailable);
-
-    // IMachine methods
-    STDMETHOD(LockMachine)(ISession *aSession, LockType_T lockType);
-    STDMETHOD(LaunchVMProcess)(ISession *aSession,  IN_BSTR aType, IN_BSTR aEnvironment, IProgress **aProgress);
-
-    STDMETHOD(SetBootOrder)(ULONG aPosition, DeviceType_T aDevice);
-    STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice);
-    STDMETHOD(AttachDeviceWithoutMedium)(IN_BSTR aControllerName, LONG aControllerPort,
-                                        LONG aDevice, DeviceType_T aType);
-    STDMETHOD(AttachDevice)(IN_BSTR aControllerName, LONG aControllerPort,
-                            LONG aDevice, DeviceType_T aType, IMedium *aMedium);
-    STDMETHOD(DetachDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice);
-    STDMETHOD(PassthroughDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aPassthrough);
-    STDMETHOD(TemporaryEjectDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aTempEject);
-    STDMETHOD(NonRotationalDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aNonRotational);
-    STDMETHOD(SetAutoDiscardForDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aDiscard);
-    STDMETHOD(SetHotPluggableForDevice)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice, BOOL aHotPluggable);
-    STDMETHOD(SetNoBandwidthGroupForDevice)(IN_BSTR aControllerName, LONG aControllerPort,
-                                            LONG aDevice);
-    STDMETHOD(SetBandwidthGroupForDevice)(IN_BSTR aControllerName, LONG aControllerPort,
-                                          LONG aDevice, IBandwidthGroup *aBandwidthGroup);
-    STDMETHOD(MountMedium)(IN_BSTR aControllerName, LONG aControllerPort,
-                           LONG aDevice, IMedium *aMedium, BOOL aForce);
-    STDMETHOD(UnmountMedium)(IN_BSTR aControllerName, LONG aControllerPort,
-                             LONG aDevice, BOOL aForce);
-    STDMETHOD(GetMedium)(IN_BSTR aControllerName, LONG aControllerPort, LONG aDevice,
-                         IMedium **aMedium);
-    STDMETHOD(GetSerialPort)(ULONG slot, ISerialPort **port);
-    STDMETHOD(GetParallelPort)(ULONG slot, IParallelPort **port);
-    STDMETHOD(GetNetworkAdapter)(ULONG slot, INetworkAdapter **adapter);
-    STDMETHOD(GetExtraDataKeys)(ComSafeArrayOut(BSTR, aKeys));
-    STDMETHOD(GetExtraData)(IN_BSTR aKey, BSTR *aValue);
-    STDMETHOD(SetExtraData)(IN_BSTR aKey, IN_BSTR aValue);
-    STDMETHOD(GetCPUProperty)(CPUPropertyType_T property, BOOL *aVal);
-    STDMETHOD(SetCPUProperty)(CPUPropertyType_T property, BOOL aVal);
-    STDMETHOD(GetCPUIDLeaf)(ULONG id, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
-    STDMETHOD(SetCPUIDLeaf)(ULONG id, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx);
-    STDMETHOD(RemoveCPUIDLeaf)(ULONG id);
-    STDMETHOD(RemoveAllCPUIDLeaves)();
-    STDMETHOD(GetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL *aVal);
-    STDMETHOD(SetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL aVal);
-    STDMETHOD(SetSettingsFilePath)(IN_BSTR aFilePath, IProgress **aProgress);
-    STDMETHOD(SaveSettings)();
-    STDMETHOD(DiscardSettings)();
-    STDMETHOD(Unregister)(CleanupMode_T cleanupMode, ComSafeArrayOut(IMedium*, aMedia));
-    STDMETHOD(DeleteConfig)(ComSafeArrayIn(IMedium*, aMedia), IProgress **aProgress);
-    STDMETHOD(ExportTo)(IAppliance *aAppliance, IN_BSTR location, IVirtualSystemDescription **aDescription);
-    STDMETHOD(FindSnapshot)(IN_BSTR aNameOrId, ISnapshot **aSnapshot);
-    STDMETHOD(CreateSharedFolder)(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable, BOOL aAutoMount);
-    STDMETHOD(RemoveSharedFolder)(IN_BSTR aName);
-    STDMETHOD(CanShowConsoleWindow)(BOOL *aCanShow);
-    STDMETHOD(ShowConsoleWindow)(LONG64 *aWinId);
-    STDMETHOD(GetGuestProperty)(IN_BSTR aName, BSTR *aValue, LONG64 *aTimestamp, BSTR *aFlags);
-    STDMETHOD(GetGuestPropertyValue)(IN_BSTR aName, BSTR *aValue);
-    STDMETHOD(GetGuestPropertyTimestamp)(IN_BSTR aName, LONG64 *aTimestamp);
-    STDMETHOD(SetGuestProperty)(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags);
-    STDMETHOD(SetGuestPropertyValue)(IN_BSTR aName, IN_BSTR aValue);
-    STDMETHOD(DeleteGuestProperty)(IN_BSTR aName);
-    STDMETHOD(EnumerateGuestProperties)(IN_BSTR aPattern, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(LONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags));
-    STDMETHOD(GetMediumAttachmentsOfController)(IN_BSTR aName, ComSafeArrayOut(IMediumAttachment *, aAttachments));
-    STDMETHOD(GetMediumAttachment)(IN_BSTR aConstrollerName, LONG aControllerPort, LONG aDevice, IMediumAttachment **aAttachment);
-    STDMETHOD(AddStorageController)(IN_BSTR aName, StorageBus_T aConnectionType, IStorageController **controller);
-    STDMETHOD(RemoveStorageController(IN_BSTR aName));
-    STDMETHOD(GetStorageControllerByName(IN_BSTR aName, IStorageController **storageController));
-    STDMETHOD(GetStorageControllerByInstance(ULONG aInstance, IStorageController **storageController));
-    STDMETHOD(SetStorageControllerBootable)(IN_BSTR aName, BOOL fBootable);
-    STDMETHOD(AddUSBController)(IN_BSTR aName, USBControllerType_T aConnectionType, IUSBController **controller);
-    STDMETHOD(RemoveUSBController(IN_BSTR aName));
-    STDMETHOD(GetUSBControllerByName(IN_BSTR aName, IUSBController **usbController));
-    STDMETHOD(GetUSBControllerCountByType(USBControllerType_T aType, ULONG *aControllers));
-    STDMETHOD(QuerySavedGuestScreenInfo)(ULONG uScreenId, ULONG *puOriginX, ULONG *puOriginY, ULONG *puWidth, ULONG *puHeight, BOOL *pfEnabled);
-    STDMETHOD(QuerySavedThumbnailSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
-    STDMETHOD(ReadSavedThumbnailToArray)(ULONG aScreenId, BOOL aBGR, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
-    STDMETHOD(ReadSavedThumbnailPNGToArray)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
-    STDMETHOD(QuerySavedScreenshotPNGSize)(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight);
-    STDMETHOD(ReadSavedScreenshotPNGToArray)(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData));
-    STDMETHOD(HotPlugCPU(ULONG aCpu));
-    STDMETHOD(HotUnplugCPU(ULONG aCpu));
-    STDMETHOD(GetCPUStatus(ULONG aCpu, BOOL *aCpuAttached));
-    STDMETHOD(QueryLogFilename(ULONG aIdx, BSTR *aName));
-    STDMETHOD(ReadLog(ULONG aIdx, LONG64 aOffset, LONG64 aSize, ComSafeArrayOut(BYTE, aData)));
-    STDMETHOD(AttachHostPCIDevice(LONG hostAddress, LONG desiredGuestAddress, BOOL tryToUnbind));
-    STDMETHOD(DetachHostPCIDevice(LONG hostAddress));
-    STDMETHOD(CloneTo(IMachine *pTarget, CloneMode_T mode, ComSafeArrayIn(CloneOptions_T, options), IProgress **pProgress));
+
+
     // public methods only for internal purposes
 
-    virtual bool isSnapshotMachine() const
+    virtual bool i_isSnapshotMachine() const
     {
         return false;
     }
 
-    virtual bool isSessionMachine() const
+    virtual bool i_isSessionMachine() const
     {
         return false;
@@ -639,5 +409,5 @@
     //  that use it. Note: they should enter Machine lock to keep the returned
     //  information valid!
-    bool isRegistered() { return !!mData->mRegistered; }
+    bool i_isRegistered() { return !!mData->mRegistered; }
 
     // unsafe inline public methods for internal purposes only (ensure there is
@@ -651,5 +421,5 @@
      * one) or after doing addCaller() manually.
      */
-    VirtualBox* getVirtualBox() const { return mParent; }
+    VirtualBox* i_getVirtualBox() const { return mParent; }
 
     /**
@@ -661,5 +431,5 @@
      * one) or after doing addCaller() manually.
      */
-    bool isAccessible() const { return !!mData->mAccessible; }
+    bool i_isAccessible() const { return !!mData->mAccessible; }
 
     /**
@@ -670,5 +440,5 @@
      * one) or after adding a caller manually.
      */
-    const Guid& getId() const { return mData->mUuid; }
+    const Guid& i_getId() const { return mData->mUuid; }
 
     /**
@@ -680,5 +450,5 @@
      * one) or after adding a caller manually.
      */
-    inline const Guid& getSnapshotId() const;
+    inline const Guid& i_getSnapshotId() const;
 
     /**
@@ -689,5 +459,5 @@
      * for reading.
      */
-    const Utf8Str& getSettingsFileFull() const { return mData->m_strConfigFileFull; }
+    const Utf8Str& i_getSettingsFileFull() const { return mData->m_strConfigFileFull; }
 
     /**
@@ -698,5 +468,5 @@
      * for reading.
      */
-    const Utf8Str& getName() const { return mUserData->s.strName; }
+    const Utf8Str& i_getName() const { return mUserData->s.strName; }
 
     enum
@@ -723,55 +493,57 @@
      * for reading.
      */
-    ChipsetType_T getChipsetType() const { return mHWData->mChipsetType; }
-    ParavirtProvider_T getParavirtProvider() const { return mHWData->mParavirtProvider; }
-
-    void setModified(uint32_t fl, bool fAllowStateModification = true);
-    void setModifiedLock(uint32_t fl, bool fAllowStateModification = true);
-
-    bool isStateModificationAllowed() const { return mData->m_fAllowStateModification; }
-    void allowStateModification()           { mData->m_fAllowStateModification = true; }
-    void disallowStateModification()        { mData->m_fAllowStateModification = false; }
-
-    const StringsList &getGroups() const { return mUserData->s.llGroups; }
+    ChipsetType_T i_getChipsetType() const { return mHWData->mChipsetType; }
+    ParavirtProvider_T i_getParavirtProvider() const { return mHWData->mParavirtProvider; }
+
+    void i_setModified(uint32_t fl, bool fAllowStateModification = true);
+    void i_setModifiedLock(uint32_t fl, bool fAllowStateModification = true);
+
+    bool i_isStateModificationAllowed() const { return mData->m_fAllowStateModification; }
+    void i_allowStateModification()           { mData->m_fAllowStateModification = true; }
+    void i_disallowStateModification()        { mData->m_fAllowStateModification = false; }
+
+    const StringsList &i_getGroups() const { return mUserData->s.llGroups; }
 
     // callback handlers
-    virtual HRESULT onNetworkAdapterChange(INetworkAdapter * /* networkAdapter */, BOOL /* changeAdapter */) { return S_OK; }
-    virtual HRESULT onNATRedirectRuleChange(ULONG /* slot */, BOOL /* fRemove */ , IN_BSTR /* name */,
-                                 NATProtocol_T /* protocol */, IN_BSTR /* host ip */, LONG /* host port */, IN_BSTR /* guest port */, LONG /* guest port */ ) { return S_OK; }
-    virtual HRESULT onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
-    virtual HRESULT onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
-    virtual HRESULT onVRDEServerChange(BOOL /* aRestart */) { return S_OK; }
-    virtual HRESULT onUSBControllerChange() { return S_OK; }
-    virtual HRESULT onStorageControllerChange() { return S_OK; }
-    virtual HRESULT onCPUChange(ULONG /* aCPU */, BOOL /* aRemove */) { return S_OK; }
-    virtual HRESULT onCPUExecutionCapChange(ULONG /* aExecutionCap */) { return S_OK; }
-    virtual HRESULT onMediumChange(IMediumAttachment * /* mediumAttachment */, BOOL /* force */) { return S_OK; }
-    virtual HRESULT onSharedFolderChange() { return S_OK; }
-    virtual HRESULT onClipboardModeChange(ClipboardMode_T /* aClipboardMode */) { return S_OK; }
-    virtual HRESULT onDnDModeChange(DnDMode_T /* aDnDMode */) { return S_OK; }
-    virtual HRESULT onBandwidthGroupChange(IBandwidthGroup * /* aBandwidthGroup */) { return S_OK; }
-    virtual HRESULT onStorageDeviceChange(IMediumAttachment * /* mediumAttachment */, BOOL /* remove */, BOOL /* silent */) { return S_OK; }
-    virtual HRESULT onVideoCaptureChange() { return S_OK; }
-
-    HRESULT saveRegistryEntry(settings::MachineRegistryEntry &data);
-
-    int calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
-    void copyPathRelativeToMachine(const Utf8Str &strSource, Utf8Str &strTarget);
-
-    void getLogFolder(Utf8Str &aLogFolder);
-    Utf8Str queryLogFilename(ULONG idx);
-
-    void composeSavedStateFilename(Utf8Str &strStateFilePath);
-
-    void getDefaultVideoCaptureFile(Utf8Str &strFile);
-
-    bool isUSBControllerPresent();
-
-    HRESULT launchVMProcess(IInternalSessionControl *aControl,
-                            const Utf8Str &strType,
-                            const Utf8Str &strEnvironment,
-                            ProgressProxy *aProgress);
-
-    HRESULT getDirectControl(ComPtr<IInternalSessionControl> *directControl)
+    virtual HRESULT i_onNetworkAdapterChange(INetworkAdapter * /* networkAdapter */, BOOL /* changeAdapter */) { return S_OK; }
+    virtual HRESULT i_onNATRedirectRuleChange(ULONG /* slot */, BOOL /* fRemove */ , IN_BSTR /* name */,
+                                              NATProtocol_T /* protocol */, IN_BSTR /* host ip */, LONG /* host port */,
+                                              IN_BSTR /* guest port */, LONG /* guest port */ ) { return S_OK; }
+    virtual HRESULT i_onSerialPortChange(ISerialPort * /* serialPort */) { return S_OK; }
+    virtual HRESULT i_onParallelPortChange(IParallelPort * /* parallelPort */) { return S_OK; }
+    virtual HRESULT i_onVRDEServerChange(BOOL /* aRestart */) { return S_OK; }
+    virtual HRESULT i_onUSBControllerChange() { return S_OK; }
+    virtual HRESULT i_onStorageControllerChange() { return S_OK; }
+    virtual HRESULT i_onCPUChange(ULONG /* aCPU */, BOOL /* aRemove */) { return S_OK; }
+    virtual HRESULT i_onCPUExecutionCapChange(ULONG /* aExecutionCap */) { return S_OK; }
+    virtual HRESULT i_onMediumChange(IMediumAttachment * /* mediumAttachment */, BOOL /* force */) { return S_OK; }
+    virtual HRESULT i_onSharedFolderChange() { return S_OK; }
+    virtual HRESULT i_onClipboardModeChange(ClipboardMode_T /* aClipboardMode */) { return S_OK; }
+    virtual HRESULT i_onDnDModeChange(DnDMode_T /* aDnDMode */) { return S_OK; }
+    virtual HRESULT i_onBandwidthGroupChange(IBandwidthGroup * /* aBandwidthGroup */) { return S_OK; }
+    virtual HRESULT i_onStorageDeviceChange(IMediumAttachment * /* mediumAttachment */, BOOL /* remove */,
+                                            BOOL /* silent */) { return S_OK; }
+    virtual HRESULT i_onVideoCaptureChange() { return S_OK; }
+
+    HRESULT i_saveRegistryEntry(settings::MachineRegistryEntry &data);
+
+    int i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult);
+    void i_copyPathRelativeToMachine(const Utf8Str &strSource, Utf8Str &strTarget);
+
+    void i_getLogFolder(Utf8Str &aLogFolder);
+    Utf8Str i_queryLogFilename(ULONG idx);
+
+    void i_composeSavedStateFilename(Utf8Str &strStateFilePath);
+
+    void i_getDefaultVideoCaptureFile(Utf8Str &strFile);
+
+    bool i_isUSBControllerPresent();
+
+    HRESULT i_launchVMProcess(IInternalSessionControl *aControl,
+                              const Utf8Str &strType,
+                              const Utf8Str &strEnvironment,
+                              ProgressProxy *aProgress);
+
+    HRESULT i_getDirectControl(ComPtr<IInternalSessionControl> *directControl)
     {
         HRESULT rc;
@@ -786,33 +558,33 @@
     }
 
-    bool isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
-                       ComPtr<IInternalSessionControl> *aControl = NULL,
-                       bool aAllowClosing = false);
-    bool isSessionSpawning();
-
-    bool isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine,
-                                ComPtr<IInternalSessionControl> *aControl = NULL)
-    { return isSessionOpen(aMachine, aControl, true /* aAllowClosing */); }
-
-    bool checkForSpawnFailure();
-
-    HRESULT prepareRegister();
-
-    HRESULT getSharedFolder(CBSTR aName,
-                            ComObjPtr<SharedFolder> &aSharedFolder,
-                            bool aSetError = false)
+    bool i_isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
+                         ComPtr<IInternalSessionControl> *aControl = NULL,
+                         bool aAllowClosing = false);
+    bool i_isSessionSpawning();
+
+    bool i_isSessionOpenOrClosing(ComObjPtr<SessionMachine> &aMachine,
+                                  ComPtr<IInternalSessionControl> *aControl = NULL)
+    { return i_isSessionOpen(aMachine, aControl, true /* aAllowClosing */); }
+
+    bool i_checkForSpawnFailure();
+
+    HRESULT i_prepareRegister();
+
+    HRESULT i_getSharedFolder(CBSTR aName,
+                              ComObjPtr<SharedFolder> &aSharedFolder,
+                              bool aSetError = false)
     {
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        return findSharedFolder(aName, aSharedFolder, aSetError);
+        return i_findSharedFolder(aName, aSharedFolder, aSetError);
     }
 
-    HRESULT addStateDependency(StateDependency aDepType = AnyStateDep,
-                               MachineState_T *aState = NULL,
-                               BOOL *aRegistered = NULL);
-    void releaseStateDependency();
-
-    HRESULT getBandwidthGroup(const Utf8Str &strBandwidthGroup,
-                              ComObjPtr<BandwidthGroup> &pBandwidthGroup,
-                              bool fSetError = false)
+    HRESULT i_addStateDependency(StateDependency aDepType = AnyStateDep,
+                                 MachineState_T *aState = NULL,
+                                 BOOL *aRegistered = NULL);
+    void i_releaseStateDependency();
+
+    HRESULT i_getBandwidthGroup(const Utf8Str &strBandwidthGroup,
+                                ComObjPtr<BandwidthGroup> &pBandwidthGroup,
+                                bool fSetError = false)
     {
         return mBandwidthControl->i_getBandwidthGroupByName(strBandwidthGroup,
@@ -821,57 +593,59 @@
     }
 
+
+
 protected:
 
     class ClientToken;
 
-    HRESULT checkStateDependency(StateDependency aDepType);
-
-    Machine *getMachine();
-
-    void ensureNoStateDependencies();
-
-    virtual HRESULT setMachineState(MachineState_T aMachineState);
-
-    HRESULT findSharedFolder(const Utf8Str &aName,
-                             ComObjPtr<SharedFolder> &aSharedFolder,
-                             bool aSetError = false);
-
-    HRESULT loadSettings(bool aRegistered);
-    HRESULT loadMachineDataFromSettings(const settings::MachineConfigFile &config,
-                                        const Guid *puuidRegistry);
-    HRESULT loadSnapshot(const settings::Snapshot &data,
-                         const Guid &aCurSnapshotId,
-                         Snapshot *aParentSnapshot);
-    HRESULT loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg,
-                         const settings::Autostart *pAutostart);
-    HRESULT loadDebugging(const settings::Debugging *pDbg);
-    HRESULT loadAutostart(const settings::Autostart *pAutostart);
-    HRESULT loadStorageControllers(const settings::Storage &data,
-                                   const Guid *puuidRegistry,
-                                   const Guid *puuidSnapshot);
-    HRESULT loadStorageDevices(StorageController *aStorageController,
-                               const settings::StorageController &data,
-                               const Guid *puuidRegistry,
-                               const Guid *puuidSnapshot);
-
-    HRESULT findSnapshotById(const Guid &aId,
-                             ComObjPtr<Snapshot> &aSnapshot,
-                             bool aSetError = false);
-    HRESULT findSnapshotByName(const Utf8Str &strName,
+    HRESULT i_checkStateDependency(StateDependency aDepType);
+
+    Machine *i_getMachine();
+
+    void i_ensureNoStateDependencies();
+
+    virtual HRESULT i_setMachineState(MachineState_T aMachineState);
+
+    HRESULT i_findSharedFolder(const Utf8Str &aName,
+                               ComObjPtr<SharedFolder> &aSharedFolder,
+                               bool aSetError = false);
+
+    HRESULT i_loadSettings(bool aRegistered);
+    HRESULT i_loadMachineDataFromSettings(const settings::MachineConfigFile &config,
+                                          const Guid *puuidRegistry);
+    HRESULT i_loadSnapshot(const settings::Snapshot &data,
+                           const Guid &aCurSnapshotId,
+                           Snapshot *aParentSnapshot);
+    HRESULT i_loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg,
+                           const settings::Autostart *pAutostart);
+    HRESULT i_loadDebugging(const settings::Debugging *pDbg);
+    HRESULT i_loadAutostart(const settings::Autostart *pAutostart);
+    HRESULT i_loadStorageControllers(const settings::Storage &data,
+                                     const Guid *puuidRegistry,
+                                     const Guid *puuidSnapshot);
+    HRESULT i_loadStorageDevices(StorageController *aStorageController,
+                                 const settings::StorageController &data,
+                                 const Guid *puuidRegistry,
+                                 const Guid *puuidSnapshot);
+
+    HRESULT i_findSnapshotById(const Guid &aId,
                                ComObjPtr<Snapshot> &aSnapshot,
                                bool aSetError = false);
-
-    HRESULT getStorageControllerByName(const Utf8Str &aName,
-                                       ComObjPtr<StorageController> &aStorageController,
-                                       bool aSetError = false);
-
-    HRESULT getMediumAttachmentsOfController(CBSTR aName,
-                                             MediaData::AttachmentList &aAttachments);
-
-    HRESULT getUSBControllerByName(const Utf8Str &aName,
-                                   ComObjPtr<USBController> &aUSBController,
-                                   bool aSetError = false);
-
-    ULONG   getUSBControllerCountByType(USBControllerType_T enmType);
+    HRESULT i_findSnapshotByName(const Utf8Str &strName,
+                                 ComObjPtr<Snapshot> &aSnapshot,
+                                 bool aSetError = false);
+
+    HRESULT i_getStorageControllerByName(const Utf8Str &aName,
+                                         ComObjPtr<StorageController> &aStorageController,
+                                         bool aSetError = false);
+
+    HRESULT i_getMediumAttachmentsOfController(const Utf8Str &aName,
+                                               MediaData::AttachmentList &aAttachments);
+
+    HRESULT i_getUSBControllerByName(const Utf8Str &aName,
+                                     ComObjPtr<USBController> &aUSBController,
+                                     bool aSetError = false);
+
+    ULONG   i_getUSBControllerCountByType(USBControllerType_T enmType);
 
     enum
@@ -887,81 +661,81 @@
     };
 
-    HRESULT prepareSaveSettings(bool *pfNeedsGlobalSaveSettings);
-    HRESULT saveSettings(bool *pfNeedsGlobalSaveSettings, int aFlags = 0);
-
-    void copyMachineDataToSettings(settings::MachineConfigFile &config);
-    HRESULT saveAllSnapshots(settings::MachineConfigFile &config);
-    HRESULT saveHardware(settings::Hardware &data, settings::Debugging *pDbg,
-                         settings::Autostart *pAutostart);
-    HRESULT saveStorageControllers(settings::Storage &data);
-    HRESULT saveStorageDevices(ComObjPtr<StorageController> aStorageController,
-                               settings::StorageController &data);
-    HRESULT saveStateSettings(int aFlags);
-
-    void addMediumToRegistry(ComObjPtr<Medium> &pMedium);
-
-    HRESULT createImplicitDiffs(IProgress *aProgress,
-                                ULONG aWeight,
-                                bool aOnline);
-    HRESULT deleteImplicitDiffs(bool aOnline);
-
-    MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
-                                     IN_BSTR aControllerName,
-                                     LONG aControllerPort,
-                                     LONG aDevice);
-    MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
-                                     ComObjPtr<Medium> pMedium);
-    MediumAttachment* findAttachment(const MediaData::AttachmentList &ll,
-                                     Guid &id);
-
-    HRESULT detachDevice(MediumAttachment *pAttach,
-                         AutoWriteLock &writeLock,
-                         Snapshot *pSnapshot);
-
-    HRESULT detachAllMedia(AutoWriteLock &writeLock,
-                           Snapshot *pSnapshot,
-                           CleanupMode_T cleanupMode,
-                           MediaList &llMedia);
-
-    void commitMedia(bool aOnline = false);
-    void rollbackMedia();
-
-    bool isInOwnDir(Utf8Str *aSettingsDir = NULL) const;
-
-    void rollback(bool aNotify);
-    void commit();
-    void copyFrom(Machine *aThat);
-    bool isControllerHotplugCapable(StorageControllerType_T enmCtrlType);
+    HRESULT i_prepareSaveSettings(bool *pfNeedsGlobalSaveSettings);
+    HRESULT i_saveSettings(bool *pfNeedsGlobalSaveSettings, int aFlags = 0);
+
+    void i_copyMachineDataToSettings(settings::MachineConfigFile &config);
+    HRESULT i_saveAllSnapshots(settings::MachineConfigFile &config);
+    HRESULT i_saveHardware(settings::Hardware &data, settings::Debugging *pDbg,
+                           settings::Autostart *pAutostart);
+    HRESULT i_saveStorageControllers(settings::Storage &data);
+    HRESULT i_saveStorageDevices(ComObjPtr<StorageController> aStorageController,
+                                 settings::StorageController &data);
+    HRESULT i_saveStateSettings(int aFlags);
+
+    void i_addMediumToRegistry(ComObjPtr<Medium> &pMedium);
+
+    HRESULT i_createImplicitDiffs(IProgress *aProgress,
+                                  ULONG aWeight,
+                                  bool aOnline);
+    HRESULT i_deleteImplicitDiffs(bool aOnline);
+
+    MediumAttachment* i_findAttachment(const MediaData::AttachmentList &ll,
+                                       IN_BSTR aControllerName,
+                                       LONG aControllerPort,
+                                       LONG aDevice);
+    MediumAttachment* i_findAttachment(const MediaData::AttachmentList &ll,
+                                       ComObjPtr<Medium> pMedium);
+    MediumAttachment* i_findAttachment(const MediaData::AttachmentList &ll,
+                                       Guid &id);
+
+    HRESULT i_detachDevice(MediumAttachment *pAttach,
+                           AutoWriteLock &writeLock,
+                           Snapshot *pSnapshot);
+
+    HRESULT i_detachAllMedia(AutoWriteLock &writeLock,
+                             Snapshot *pSnapshot,
+                             CleanupMode_T cleanupMode,
+                             MediaList &llMedia);
+
+    void i_commitMedia(bool aOnline = false);
+    void i_rollbackMedia();
+
+    bool i_isInOwnDir(Utf8Str *aSettingsDir = NULL) const;
+
+    void i_rollback(bool aNotify);
+    void i_commit();
+    void i_copyFrom(Machine *aThat);
+    bool i_isControllerHotplugCapable(StorageControllerType_T enmCtrlType);
 
     struct DeleteTask;
     static DECLCALLBACK(int) deleteThread(RTTHREAD Thread, void *pvUser);
-    HRESULT deleteTaskWorker(DeleteTask &task);
-
-    Utf8Str getExtraData(const Utf8Str &strKey);
+    HRESULT i_deleteTaskWorker(DeleteTask &task);
+    Utf8Str i_getExtraData(const Utf8Str &strKey);
 
 #ifdef VBOX_WITH_GUEST_PROPS
-    HRESULT getGuestPropertyFromService(IN_BSTR aName, BSTR *aValue,
-                                        LONG64 *aTimestamp, BSTR *aFlags) const;
-    HRESULT getGuestPropertyFromVM(IN_BSTR aName, BSTR *aValue,
-                                   LONG64 *aTimestamp, BSTR *aFlags) const;
-    HRESULT setGuestPropertyToService(IN_BSTR aName, IN_BSTR aValue,
-                                      IN_BSTR aFlags);
-    HRESULT setGuestPropertyToVM(IN_BSTR aName, IN_BSTR aValue,
-                                 IN_BSTR aFlags);
-    HRESULT enumerateGuestPropertiesInService
-                (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames),
-                 ComSafeArrayOut(BSTR, aValues),
-                 ComSafeArrayOut(LONG64, aTimestamps),
-                 ComSafeArrayOut(BSTR, aFlags));
-    HRESULT enumerateGuestPropertiesOnVM
-                (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames),
-                 ComSafeArrayOut(BSTR, aValues),
-                 ComSafeArrayOut(LONG64, aTimestamps),
-                 ComSafeArrayOut(BSTR, aFlags));
+    HRESULT i_getGuestPropertyFromService(const com::Utf8Str &aName, com::Utf8Str &aValue,
+                                          LONG64 *aTimestamp, com::Utf8Str &aFlags) const;
+    HRESULT i_setGuestPropertyToService(const com::Utf8Str &aName, const com::Utf8Str &aValue,
+                                        const com::Utf8Str &aFlags);
+    HRESULT i_getGuestPropertyFromVM(const com::Utf8Str &aName, com::Utf8Str &aValue,
+                                     LONG64 *aTimestamp, com::Utf8Str &aFlags) const;
+    HRESULT i_setGuestPropertyToVM(const com::Utf8Str &aName, const com::Utf8Str &aValue,
+                                   const com::Utf8Str &aFlags);
+    HRESULT i_enumerateGuestPropertiesInService(const com::Utf8Str &aPatterns,
+                                                std::vector<com::Utf8Str> &aNames,
+                                                std::vector<com::Utf8Str> &aValues,
+                                                std::vector<LONG64> &aTimestamps,
+                                                std::vector<com::Utf8Str> &aFlags);
+    HRESULT i_enumerateGuestPropertiesOnVM(const com::Utf8Str &aPatterns,
+                                           std::vector<com::Utf8Str> &aNames,
+                                           std::vector<com::Utf8Str> &aValues,
+                                           std::vector<LONG64> &aTimestamps,
+                                           std::vector<com::Utf8Str> &aFlags);
+
 #endif /* VBOX_WITH_GUEST_PROPS */
 
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
-    void getDiskList(MediaList &list);
-    void registerMetrics(PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid);
+    void i_getDiskList(MediaList &list);
+    void i_registerMetrics(PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid);
 
     pm::CollectorGuest     *mCollectorGuest;
@@ -1007,4 +781,423 @@
 
     friend class MachineCloneVM;
+
+private:
+    // wrapped IMachine properties
+    HRESULT getParent(ComPtr<IVirtualBox> &aParent);
+    HRESULT getIcon(std::vector<BYTE> &aIcon);
+    HRESULT setIcon(const std::vector<BYTE> &aIcon);
+    HRESULT getAccessible(BOOL *aAccessible);
+    HRESULT getAccessError(ComPtr<IVirtualBoxErrorInfo> &aAccessError);
+    HRESULT getName(com::Utf8Str &aName);
+    HRESULT setName(const com::Utf8Str &aName);
+    HRESULT getDescription(com::Utf8Str &aDescription);
+    HRESULT setDescription(const com::Utf8Str &aDescription);
+    HRESULT getId(com::Guid &aId);
+    HRESULT getGroups(std::vector<com::Utf8Str> &aGroups);
+    HRESULT setGroups(const std::vector<com::Utf8Str> &aGroups);
+    HRESULT getOSTypeId(com::Utf8Str &aOSTypeId);
+    HRESULT setOSTypeId(const com::Utf8Str &aOSTypeId);
+    HRESULT getHardwareVersion(com::Utf8Str &aHardwareVersion);
+    HRESULT setHardwareVersion(const com::Utf8Str &aHardwareVersion);
+    HRESULT getHardwareUUID(com::Guid &aHardwareUUID);
+    HRESULT setHardwareUUID(const com::Guid &aHardwareUUID);
+    HRESULT getCPUCount(ULONG *aCPUCount);
+    HRESULT setCPUCount(ULONG aCPUCount);
+    HRESULT getCPUHotPlugEnabled(BOOL *aCPUHotPlugEnabled);
+    HRESULT setCPUHotPlugEnabled(BOOL aCPUHotPlugEnabled);
+    HRESULT getCPUExecutionCap(ULONG *aCPUExecutionCap);
+    HRESULT setCPUExecutionCap(ULONG aCPUExecutionCap);
+    HRESULT getMemorySize(ULONG *aMemorySize);
+    HRESULT setMemorySize(ULONG aMemorySize);
+    HRESULT getMemoryBalloonSize(ULONG *aMemoryBalloonSize);
+    HRESULT setMemoryBalloonSize(ULONG aMemoryBalloonSize);
+    HRESULT getPageFusionEnabled(BOOL *aPageFusionEnabled);
+    HRESULT setPageFusionEnabled(BOOL aPageFusionEnabled);
+    HRESULT getGraphicsControllerType(GraphicsControllerType_T *aGraphicsControllerType);
+    HRESULT setGraphicsControllerType(GraphicsControllerType_T aGraphicsControllerType);
+    HRESULT getVRAMSize(ULONG *aVRAMSize);
+    HRESULT setVRAMSize(ULONG aVRAMSize);
+    HRESULT getAccelerate3DEnabled(BOOL *aAccelerate3DEnabled);
+    HRESULT setAccelerate3DEnabled(BOOL aAccelerate3DEnabled);
+    HRESULT getAccelerate2DVideoEnabled(BOOL *aAccelerate2DVideoEnabled);
+    HRESULT setAccelerate2DVideoEnabled(BOOL aAccelerate2DVideoEnabled);
+    HRESULT getMonitorCount(ULONG *aMonitorCount);
+    HRESULT setMonitorCount(ULONG aMonitorCount);
+    HRESULT getVideoCaptureEnabled(BOOL *aVideoCaptureEnabled);
+    HRESULT setVideoCaptureEnabled(BOOL aVideoCaptureEnabled);
+    HRESULT getVideoCaptureScreens(std::vector<BOOL> &aVideoCaptureScreens);
+    HRESULT setVideoCaptureScreens(const std::vector<BOOL> &aVideoCaptureScreens);
+    HRESULT getVideoCaptureFile(com::Utf8Str &aVideoCaptureFile);
+    HRESULT setVideoCaptureFile(const com::Utf8Str &aVideoCaptureFile);
+    HRESULT getVideoCaptureWidth(ULONG *aVideoCaptureWidth);
+    HRESULT setVideoCaptureWidth(ULONG aVideoCaptureWidth);
+    HRESULT getVideoCaptureHeight(ULONG *aVideoCaptureHeight);
+    HRESULT setVideoCaptureHeight(ULONG aVideoCaptureHeight);
+    HRESULT getVideoCaptureRate(ULONG *aVideoCaptureRate);
+    HRESULT setVideoCaptureRate(ULONG aVideoCaptureRate);
+    HRESULT getVideoCaptureFPS(ULONG *aVideoCaptureFPS);
+    HRESULT setVideoCaptureFPS(ULONG aVideoCaptureFPS);
+    HRESULT getBIOSSettings(ComPtr<IBIOSSettings> &aBIOSSettings);
+    HRESULT getFirmwareType(FirmwareType_T *aFirmwareType);
+    HRESULT setFirmwareType(FirmwareType_T aFirmwareType);
+    HRESULT getPointingHIDType(PointingHIDType_T *aPointingHIDType);
+    HRESULT setPointingHIDType(PointingHIDType_T aPointingHIDType);
+    HRESULT getKeyboardHIDType(KeyboardHIDType_T *aKeyboardHIDType);
+    HRESULT setKeyboardHIDType(KeyboardHIDType_T aKeyboardHIDType);
+    HRESULT getHPETEnabled(BOOL *aHPETEnabled);
+    HRESULT setHPETEnabled(BOOL aHPETEnabled);
+    HRESULT getChipsetType(ChipsetType_T *aChipsetType);
+    HRESULT setChipsetType(ChipsetType_T aChipsetType);
+    HRESULT getSnapshotFolder(com::Utf8Str &aSnapshotFolder);
+    HRESULT setSnapshotFolder(const com::Utf8Str &aSnapshotFolder);
+    HRESULT getVRDEServer(ComPtr<IVRDEServer> &aVRDEServer);
+    HRESULT getEmulatedUSBCardReaderEnabled(BOOL *aEmulatedUSBCardReaderEnabled);
+    HRESULT setEmulatedUSBCardReaderEnabled(BOOL aEmulatedUSBCardReaderEnabled);
+    HRESULT getMediumAttachments(std::vector<ComPtr<IMediumAttachment> > &aMediumAttachments);
+    HRESULT getUSBControllers(std::vector<ComPtr<IUSBController> > &aUSBControllers);
+    HRESULT getUSBDeviceFilters(ComPtr<IUSBDeviceFilters> &aUSBDeviceFilters);
+    HRESULT getAudioAdapter(ComPtr<IAudioAdapter> &aAudioAdapter);
+    HRESULT getStorageControllers(std::vector<ComPtr<IStorageController> > &aStorageControllers);
+    HRESULT getSettingsFilePath(com::Utf8Str &aSettingsFilePath);
+    HRESULT getSettingsModified(BOOL *aSettingsModified);
+    HRESULT getSessionState(SessionState_T *aSessionState);
+    HRESULT getSessionType(com::Utf8Str &aSessionType);
+    HRESULT getSessionPID(ULONG *aSessionPID);
+    HRESULT getState(MachineState_T *aState);
+    HRESULT getLastStateChange(LONG64 *aLastStateChange);
+    HRESULT getStateFilePath(com::Utf8Str &aStateFilePath);
+    HRESULT getLogFolder(com::Utf8Str &aLogFolder);
+    HRESULT getCurrentSnapshot(ComPtr<ISnapshot> &aCurrentSnapshot);
+    HRESULT getSnapshotCount(ULONG *aSnapshotCount);
+    HRESULT getCurrentStateModified(BOOL *aCurrentStateModified);
+    HRESULT getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders);
+    HRESULT getClipboardMode(ClipboardMode_T *aClipboardMode);
+    HRESULT setClipboardMode(ClipboardMode_T aClipboardMode);
+    HRESULT getDnDMode(DnDMode_T *aDnDMode);
+    HRESULT setDnDMode(DnDMode_T aDnDMode);
+    HRESULT getGuestPropertyNotificationPatterns(com::Utf8Str &aGuestPropertyNotificationPatterns);
+    HRESULT setGuestPropertyNotificationPatterns(const com::Utf8Str &aGuestPropertyNotificationPatterns);
+    HRESULT getTeleporterEnabled(BOOL *aTeleporterEnabled);
+    HRESULT setTeleporterEnabled(BOOL aTeleporterEnabled);
+    HRESULT getTeleporterPort(ULONG *aTeleporterPort);
+    HRESULT setTeleporterPort(ULONG aTeleporterPort);
+    HRESULT getTeleporterAddress(com::Utf8Str &aTeleporterAddress);
+    HRESULT setTeleporterAddress(const com::Utf8Str &aTeleporterAddress);
+    HRESULT getTeleporterPassword(com::Utf8Str &aTeleporterPassword);
+    HRESULT setTeleporterPassword(const com::Utf8Str &aTeleporterPassword);
+    HRESULT getParavirtProvider(ParavirtProvider_T *aParavirtProvider);
+    HRESULT setParavirtProvider(ParavirtProvider_T aParavirtProvider);
+    HRESULT getFaultToleranceState(FaultToleranceState_T *aFaultToleranceState);
+    HRESULT setFaultToleranceState(FaultToleranceState_T aFaultToleranceState);
+    HRESULT getFaultTolerancePort(ULONG *aFaultTolerancePort);
+    HRESULT setFaultTolerancePort(ULONG aFaultTolerancePort);
+    HRESULT getFaultToleranceAddress(com::Utf8Str &aFaultToleranceAddress);
+    HRESULT setFaultToleranceAddress(const com::Utf8Str &aFaultToleranceAddress);
+    HRESULT getFaultTolerancePassword(com::Utf8Str &aFaultTolerancePassword);
+    HRESULT setFaultTolerancePassword(const com::Utf8Str &aFaultTolerancePassword);
+    HRESULT getFaultToleranceSyncInterval(ULONG *aFaultToleranceSyncInterval);
+    HRESULT setFaultToleranceSyncInterval(ULONG aFaultToleranceSyncInterval);
+    HRESULT getRTCUseUTC(BOOL *aRTCUseUTC);
+    HRESULT setRTCUseUTC(BOOL aRTCUseUTC);
+    HRESULT getIOCacheEnabled(BOOL *aIOCacheEnabled);
+    HRESULT setIOCacheEnabled(BOOL aIOCacheEnabled);
+    HRESULT getIOCacheSize(ULONG *aIOCacheSize);
+    HRESULT setIOCacheSize(ULONG aIOCacheSize);
+    HRESULT getPCIDeviceAssignments(std::vector<ComPtr<IPCIDeviceAttachment> > &aPCIDeviceAssignments);
+    HRESULT getBandwidthControl(ComPtr<IBandwidthControl> &aBandwidthControl);
+    HRESULT getTracingEnabled(BOOL *aTracingEnabled);
+    HRESULT setTracingEnabled(BOOL aTracingEnabled);
+    HRESULT getTracingConfig(com::Utf8Str &aTracingConfig);
+    HRESULT setTracingConfig(const com::Utf8Str &aTracingConfig);
+    HRESULT getAllowTracingToAccessVM(BOOL *aAllowTracingToAccessVM);
+    HRESULT setAllowTracingToAccessVM(BOOL aAllowTracingToAccessVM);
+    HRESULT getAutostartEnabled(BOOL *aAutostartEnabled);
+    HRESULT setAutostartEnabled(BOOL aAutostartEnabled);
+    HRESULT getAutostartDelay(ULONG *aAutostartDelay);
+    HRESULT setAutostartDelay(ULONG aAutostartDelay);
+    HRESULT getAutostopType(AutostopType_T *aAutostopType);
+    HRESULT setAutostopType(AutostopType_T aAutostopType);
+    HRESULT getDefaultFrontend(com::Utf8Str &aDefaultFrontend);
+    HRESULT setDefaultFrontend(const com::Utf8Str &aDefaultFrontend);
+    HRESULT getUSBProxyAvailable(BOOL *aUSBProxyAvailable);
+
+    // wrapped IMachine methods
+    HRESULT lockMachine(const ComPtr<ISession> &aSession,
+                        LockType_T aLockType);
+    HRESULT launchVMProcess(const ComPtr<ISession> &aSession,
+                            const com::Utf8Str &aType,
+                            const com::Utf8Str &aEnvironment,
+                            ComPtr<IProgress> &aProgress);
+    HRESULT setBootOrder(ULONG aPosition,
+                         DeviceType_T aDevice);
+    HRESULT getBootOrder(ULONG aPosition,
+                         DeviceType_T *aDevice);
+    HRESULT attachDevice(const com::Utf8Str &aName,
+                         LONG aControllerPort,
+                         LONG aDevice,
+                         DeviceType_T aType,
+                         const ComPtr<IMedium> &aMedium);
+    HRESULT attachDeviceWithoutMedium(const com::Utf8Str &aName,
+                                      LONG aControllerPort,
+                                      LONG aDevice,
+                                      DeviceType_T aType);
+    HRESULT detachDevice(const com::Utf8Str &aName,
+                         LONG aControllerPort,
+                         LONG aDevice);
+    HRESULT passthroughDevice(const com::Utf8Str &aName,
+                              LONG aControllerPort,
+                              LONG aDevice,
+                              BOOL aPassthrough);
+    HRESULT temporaryEjectDevice(const com::Utf8Str &aName,
+                                 LONG aControllerPort,
+                                 LONG aDevice,
+                                 BOOL aTemporaryEject);
+    HRESULT nonRotationalDevice(const com::Utf8Str &aName,
+                                LONG aControllerPort,
+                                LONG aDevice,
+                                BOOL aNonRotational);
+    HRESULT setAutoDiscardForDevice(const com::Utf8Str &aName,
+                                    LONG aControllerPort,
+                                    LONG aDevice,
+                                    BOOL aDiscard);
+    HRESULT setHotPluggableForDevice(const com::Utf8Str &aName,
+                                     LONG aControllerPort,
+                                     LONG aDevice,
+                                     BOOL aHotPluggable);
+    HRESULT setBandwidthGroupForDevice(const com::Utf8Str &aName,
+                                       LONG aControllerPort,
+                                       LONG aDevice,
+                                       const ComPtr<IBandwidthGroup> &aBandwidthGroup);
+    HRESULT setNoBandwidthGroupForDevice(const com::Utf8Str &aName,
+                                         LONG aControllerPort,
+                                         LONG aDevice);
+    HRESULT unmountMedium(const com::Utf8Str &aName,
+                          LONG aControllerPort,
+                          LONG aDevice,
+                          BOOL aForce);
+    HRESULT mountMedium(const com::Utf8Str &aName,
+                        LONG aControllerPort,
+                        LONG aDevice,
+                        const ComPtr<IMedium> &aMedium,
+                        BOOL aForce);
+    HRESULT getMedium(const com::Utf8Str &aName,
+                      LONG aControllerPort,
+                      LONG aDevice,
+                      ComPtr<IMedium> &aMedium);
+    HRESULT getMediumAttachmentsOfController(const com::Utf8Str &aName,
+                                             std::vector<ComPtr<IMediumAttachment> > &aMediumAttachments);
+    HRESULT getMediumAttachment(const com::Utf8Str &aName,
+                                LONG aControllerPort,
+                                LONG aDevice,
+                                ComPtr<IMediumAttachment> &aAttachment);
+    HRESULT attachHostPCIDevice(LONG aHostAddress,
+                                LONG aDesiredGuestAddress,
+                                BOOL aTryToUnbind);
+    HRESULT detachHostPCIDevice(LONG aHostAddress);
+    HRESULT getNetworkAdapter(ULONG aSlot,
+                              ComPtr<INetworkAdapter> &aAdapter);
+    HRESULT addStorageController(const com::Utf8Str &aName,
+                                 StorageBus_T aConnectionType,
+                                 ComPtr<IStorageController> &aController);
+    HRESULT getStorageControllerByName(const com::Utf8Str &aName,
+                                       ComPtr<IStorageController> &aStorageController);
+    HRESULT getStorageControllerByInstance(ULONG aInstance,
+                                           ComPtr<IStorageController> &aStorageController);
+    HRESULT removeStorageController(const com::Utf8Str &aName);
+    HRESULT setStorageControllerBootable(const com::Utf8Str &aName,
+                                         BOOL aBootable);
+    HRESULT addUSBController(const com::Utf8Str &aName,
+                             USBControllerType_T aType,
+                             ComPtr<IUSBController> &aController);
+    HRESULT removeUSBController(const com::Utf8Str &aName);
+    HRESULT getUSBControllerByName(const com::Utf8Str &aName,
+                                   ComPtr<IUSBController> &aController);
+    HRESULT getUSBControllerCountByType(USBControllerType_T aType,
+                                        ULONG *aControllers);
+    HRESULT getSerialPort(ULONG aSlot,
+                          ComPtr<ISerialPort> &aPort);
+    HRESULT getParallelPort(ULONG aSlot,
+                            ComPtr<IParallelPort> &aPort);
+    HRESULT getExtraDataKeys(std::vector<com::Utf8Str> &aKeys);
+    HRESULT getExtraData(const com::Utf8Str &aKey,
+                         com::Utf8Str &aValue);
+    HRESULT setExtraData(const com::Utf8Str &aKey,
+                         const com::Utf8Str &aValue);
+    HRESULT getCPUProperty(CPUPropertyType_T aProperty,
+                           BOOL *aValue);
+    HRESULT setCPUProperty(CPUPropertyType_T aProperty,
+                           BOOL aValue);
+    HRESULT getCPUIDLeaf(ULONG aId,
+                         ULONG *aValEax,
+                         ULONG *aValEbx,
+                         ULONG *aValEcx,
+                         ULONG *aValEdx);
+    HRESULT setCPUIDLeaf(ULONG aId,
+                         ULONG aValEax,
+                         ULONG aValEbx,
+                         ULONG aValEcx,
+                         ULONG aValEdx);
+    HRESULT removeCPUIDLeaf(ULONG aId);
+    HRESULT removeAllCPUIDLeaves();
+    HRESULT getHWVirtExProperty(HWVirtExPropertyType_T aProperty,
+                                BOOL *aValue);
+    HRESULT setHWVirtExProperty(HWVirtExPropertyType_T aProperty,
+                                BOOL aValue);
+    HRESULT setSettingsFilePath(const com::Utf8Str &aSettingsFilePath,
+                                ComPtr<IProgress> &aProgress);
+    HRESULT saveSettings();
+    HRESULT discardSettings();
+    HRESULT unregister(CleanupMode_T aCleanupMode,
+                       std::vector<ComPtr<IMedium> > &aMedia);
+    HRESULT deleteConfig(const std::vector<ComPtr<IMedium> > &aMedia,
+                         ComPtr<IProgress> &aProgress);
+    HRESULT exportTo(const ComPtr<IAppliance> &aAppliance,
+                     const com::Utf8Str &aLocation,
+                     ComPtr<IVirtualSystemDescription> &aDescription);
+    HRESULT findSnapshot(const com::Utf8Str &aNameOrId,
+                         ComPtr<ISnapshot> &aSnapshot);
+    HRESULT createSharedFolder(const com::Utf8Str &aName,
+                               const com::Utf8Str &aHostPath,
+                               BOOL aWritable,
+                               BOOL aAutomount);
+    HRESULT removeSharedFolder(const com::Utf8Str &aName);
+    HRESULT canShowConsoleWindow(BOOL *aCanShow);
+    HRESULT showConsoleWindow(LONG64 *aWinId);
+    HRESULT getGuestProperty(const com::Utf8Str &aName,
+                             com::Utf8Str &aValue,
+                             LONG64 *aTimestamp,
+                             com::Utf8Str &aFlags);
+    HRESULT getGuestPropertyValue(const com::Utf8Str &aProperty,
+                                  com::Utf8Str &aValue);
+    HRESULT getGuestPropertyTimestamp(const com::Utf8Str &aProperty,
+                                      LONG64 *aValue);
+    HRESULT setGuestProperty(const com::Utf8Str &aProperty,
+                             const com::Utf8Str &aValue,
+                             const com::Utf8Str &aFlags);
+    HRESULT setGuestPropertyValue(const com::Utf8Str &aProperty,
+                                  const com::Utf8Str &aValue);
+    HRESULT deleteGuestProperty(const com::Utf8Str &aName);
+    HRESULT enumerateGuestProperties(const com::Utf8Str &aPatterns,
+                                     std::vector<com::Utf8Str> &aNames,
+                                     std::vector<com::Utf8Str> &aValues,
+                                     std::vector<LONG64> &aTimestamps,
+                                     std::vector<com::Utf8Str> &aFlags);
+    HRESULT querySavedGuestScreenInfo(ULONG aScreenId,
+                                      ULONG *aOriginX,
+                                      ULONG *aOriginY,
+                                      ULONG *aWidth,
+                                      ULONG *aHeight,
+                                      BOOL *aEnabled);
+    HRESULT querySavedThumbnailSize(ULONG aScreenId,
+                                    ULONG *aSize,
+                                    ULONG *aWidth,
+                                    ULONG *aHeight);
+    HRESULT readSavedThumbnailToArray(ULONG aScreenId,
+                                      BOOL aBGR,
+                                      ULONG *aWidth,
+                                      ULONG *aHeight,
+                                      std::vector<BYTE> &aData);
+    HRESULT readSavedThumbnailPNGToArray(ULONG aScreenId,
+                                         ULONG *aWidth,
+                                         ULONG *aHeight,
+                                         std::vector<BYTE> &aData);
+    HRESULT querySavedScreenshotPNGSize(ULONG aScreenId,
+                                        ULONG *aSize,
+                                        ULONG *aWidth,
+                                        ULONG *aHeight);
+    HRESULT readSavedScreenshotPNGToArray(ULONG aScreenId,
+                                          ULONG *aWidth,
+                                          ULONG *aHeight,
+                                          std::vector<BYTE> &aData);
+    HRESULT hotPlugCPU(ULONG aCpu);
+    HRESULT hotUnplugCPU(ULONG aCpu);
+    HRESULT getCPUStatus(ULONG aCpu,
+                         BOOL *aAttached);
+    HRESULT queryLogFilename(ULONG aIdx,
+                             com::Utf8Str &aFilename);
+    HRESULT readLog(ULONG aIdx,
+                    LONG64 aOffset,
+                    LONG64 aSize,
+                    std::vector<BYTE> &aData);
+    HRESULT cloneTo(const ComPtr<IMachine> &aTarget,
+                    CloneMode_T aMode,
+                    const std::vector<CloneOptions_T> &aOptions,
+                    ComPtr<IProgress> &aProgress);
+
+    // wrapped IInternalMachineControl properties
+
+    // wrapped IInternalMachineControl methods
+    HRESULT setRemoveSavedStateFile(BOOL aRemove);
+    HRESULT updateState(MachineState_T aState);
+    HRESULT beginPowerUp(const ComPtr<IProgress> &aProgress);
+    HRESULT endPowerUp(LONG aResult);
+    HRESULT beginPoweringDown(ComPtr<IProgress> &aProgress);
+    HRESULT endPoweringDown(LONG aResult,
+                            const com::Utf8Str &aErrMsg);
+    HRESULT runUSBDeviceFilters(const ComPtr<IUSBDevice> &aDevice,
+                                BOOL *aMatched,
+                                ULONG *aMaskedInterfaces);
+    HRESULT captureUSBDevice(const com::Guid &aId);
+    HRESULT detachUSBDevice(const com::Guid &aId,
+                            BOOL aDone);
+    HRESULT autoCaptureUSBDevices();
+    HRESULT detachAllUSBDevices(BOOL aDone);
+    HRESULT onSessionEnd(const ComPtr<ISession> &aSession,
+                         ComPtr<IProgress> &aProgress);
+    HRESULT beginSavingState(ComPtr<IProgress> &aProgress,
+                             com::Utf8Str &aStateFilePath);
+    HRESULT endSavingState(LONG aResult,
+                           const com::Utf8Str &aErrMsg);
+    HRESULT adoptSavedState(const com::Utf8Str &aSavedStateFile);
+    HRESULT beginTakingSnapshot(const ComPtr<IConsole> &aInitiator,
+                                const com::Utf8Str &aName,
+                                const com::Utf8Str &aDescription,
+                                const ComPtr<IProgress> &aConsoleProgress,
+                                BOOL aFTakingSnapshotOnline,
+                                com::Utf8Str &aStateFilePath);
+    HRESULT endTakingSnapshot(BOOL aSuccess);
+    HRESULT deleteSnapshot(const ComPtr<IConsole> &aInitiator,
+                           const com::Guid &aStartId,
+                           const com::Guid &aEndId,
+                           BOOL aDeleteAllChildren,
+                           MachineState_T *aMachineState,
+                           ComPtr<IProgress> &aProgress);
+    HRESULT finishOnlineMergeMedium();
+    HRESULT restoreSnapshot(const ComPtr<IConsole> &aInitiator,
+                            const ComPtr<ISnapshot> &aSnapshot,
+                            MachineState_T *aMachineState,
+                            ComPtr<IProgress> &aProgress);
+    HRESULT pullGuestProperties(std::vector<com::Utf8Str> &aNames,
+                                std::vector<com::Utf8Str> &aValues,
+                                std::vector<LONG64> &aTimestamps,
+                                std::vector<com::Utf8Str> &aFlags);
+    HRESULT pushGuestProperty(const com::Utf8Str &aName,
+                              const com::Utf8Str &aValue,
+                              LONG64 aTimestamp,
+                              const com::Utf8Str &aFlags);
+    HRESULT lockMedia();
+    HRESULT unlockMedia();
+    HRESULT ejectMedium(const ComPtr<IMediumAttachment> &aAttachment,
+                        ComPtr<IMediumAttachment> &aNewAttachment);
+    HRESULT reportVmStatistics(ULONG aValidStats,
+                               ULONG aCpuUser,
+                               ULONG aCpuKernel,
+                               ULONG aCpuIdle,
+                               ULONG aMemTotal,
+                               ULONG aMemFree,
+                               ULONG aMemBalloon,
+                               ULONG aMemShared,
+                               ULONG aMemCache,
+                               ULONG aPagedTotal,
+                               ULONG aMemAllocTotal,
+                               ULONG aMemFreeTotal,
+                               ULONG aMemBalloonTotal,
+                               ULONG aMemSharedTotal,
+                               ULONG aVmNetRx,
+                               ULONG aVmNetTx);
+
+
+
+
 };
 
@@ -1021,6 +1214,5 @@
  */
 class ATL_NO_VTABLE SessionMachine :
-    public Machine,
-    VBOX_SCRIPTABLE_IMPL(IInternalMachineControl)
+    public Machine
 {
 public:
@@ -1105,5 +1297,5 @@
     // public methods only for internal purposes
 
-    virtual bool isSessionMachine() const
+    virtual bool i_isSessionMachine() const
     {
         return true;
@@ -1111,41 +1303,42 @@
 
 #ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
-    bool checkForDeath();
-
-    void getTokenId(Utf8Str &strTokenId);
+    bool i_checkForDeath();
+
+    void i_getTokenId(Utf8Str &strTokenId);
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
-    IToken *getToken();
+    IToken *i_getToken();
 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */
     // getClientToken must be only used by callers who can guarantee that
     // the object cannot be deleted in the mean time, i.e. have a caller/lock.
-    ClientToken *getClientToken();
-
-    HRESULT onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter);
-    HRESULT onNATRedirectRuleChange(ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTR aRuleName,
-                                 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort);
-    HRESULT onStorageControllerChange();
-    HRESULT onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
-    HRESULT onSerialPortChange(ISerialPort *serialPort);
-    HRESULT onParallelPortChange(IParallelPort *parallelPort);
-    HRESULT onCPUChange(ULONG aCPU, BOOL aRemove);
-    HRESULT onVRDEServerChange(BOOL aRestart);
-    HRESULT onVideoCaptureChange();
-    HRESULT onUSBControllerChange();
-    HRESULT onUSBDeviceAttach(IUSBDevice *aDevice,
-                              IVirtualBoxErrorInfo *aError,
-                              ULONG aMaskedIfs);
-    HRESULT onUSBDeviceDetach(IN_BSTR aId,
-                              IVirtualBoxErrorInfo *aError);
-    HRESULT onSharedFolderChange();
-    HRESULT onClipboardModeChange(ClipboardMode_T aClipboardMode);
-    HRESULT onDnDModeChange(DnDMode_T aDnDMode);
-    HRESULT onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup);
-    HRESULT onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent);
-    HRESULT onCPUExecutionCapChange(ULONG aCpuExecutionCap);
-
-    bool hasMatchingUSBFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs);
+    ClientToken *i_getClientToken();
+
+    HRESULT i_onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter);
+    HRESULT i_onNATRedirectRuleChange(ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTR aRuleName,
+                                      NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort,
+                                      IN_BSTR aGuestIp, LONG aGuestPort);
+    HRESULT i_onStorageControllerChange();
+    HRESULT i_onMediumChange(IMediumAttachment *aMediumAttachment, BOOL aForce);
+    HRESULT i_onSerialPortChange(ISerialPort *serialPort);
+    HRESULT i_onParallelPortChange(IParallelPort *parallelPort);
+    HRESULT i_onCPUChange(ULONG aCPU, BOOL aRemove);
+    HRESULT i_onVRDEServerChange(BOOL aRestart);
+    HRESULT i_onVideoCaptureChange();
+    HRESULT i_onUSBControllerChange();
+    HRESULT i_onUSBDeviceAttach(IUSBDevice *aDevice,
+                                IVirtualBoxErrorInfo *aError,
+                                ULONG aMaskedIfs);
+    HRESULT i_onUSBDeviceDetach(IN_BSTR aId,
+                                IVirtualBoxErrorInfo *aError);
+    HRESULT i_onSharedFolderChange();
+    HRESULT i_onClipboardModeChange(ClipboardMode_T aClipboardMode);
+    HRESULT i_onDnDModeChange(DnDMode_T aDnDMode);
+    HRESULT i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup);
+    HRESULT i_onStorageDeviceChange(IMediumAttachment *aMediumAttachment, BOOL aRemove, BOOL aSilent);
+    HRESULT i_onCPUExecutionCapChange(ULONG aCpuExecutionCap);
+
+    bool i_hasMatchingUSBFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs);
 
     HRESULT lockMedia();
-    void unlockMedia();
+    HRESULT unlockMedia();
 
 private:
@@ -1178,42 +1371,42 @@
 
     HRESULT endSavingState(HRESULT aRC, const Utf8Str &aErrMsg);
-    void releaseSavedStateFile(const Utf8Str &strSavedStateFile, Snapshot *pSnapshotToIgnore);
-
-    void deleteSnapshotHandler(DeleteSnapshotTask &aTask);
-    void restoreSnapshotHandler(RestoreSnapshotTask &aTask);
-
-    HRESULT prepareDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
-                                        const Guid &machineId,
-                                        const Guid &snapshotId,
-                                        bool fOnlineMergePossible,
-                                        MediumLockList *aVMMALockList,
-                                        ComObjPtr<Medium> &aSource,
-                                        ComObjPtr<Medium> &aTarget,
-                                        bool &fMergeForward,
-                                        ComObjPtr<Medium> &pParentForTarget,
-                                        MediumLockList * &aChildrenToReparent,
-                                        bool &fNeedOnlineMerge,
-                                        MediumLockList * &aMediumLockList,
-                                        ComPtr<IToken> &aHDLockToken);
-    void cancelDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
-                                    const ComObjPtr<Medium> &aSource,
-                                    MediumLockList *aChildrenToReparent,
-                                    bool fNeedsOnlineMerge,
-                                    MediumLockList *aMediumLockList,
-                                    const ComPtr<IToken> &aHDLockToken,
-                                    const Guid &aMediumId,
-                                    const Guid &aSnapshotId);
-    HRESULT onlineMergeMedium(const ComObjPtr<MediumAttachment> &aMediumAttachment,
-                              const ComObjPtr<Medium> &aSource,
-                              const ComObjPtr<Medium> &aTarget,
-                              bool fMergeForward,
-                              const ComObjPtr<Medium> &pParentForTarget,
-                              MediumLockList *aChildrenToReparent,
-                              MediumLockList *aMediumLockList,
-                              ComObjPtr<Progress> &aProgress,
-                              bool *pfNeedsMachineSaveSettings);
-
-    HRESULT setMachineState(MachineState_T aMachineState);
-    HRESULT updateMachineStateOnClient();
+    void i_releaseSavedStateFile(const Utf8Str &strSavedStateFile, Snapshot *pSnapshotToIgnore);
+
+    void i_deleteSnapshotHandler(DeleteSnapshotTask &aTask);
+    void i_restoreSnapshotHandler(RestoreSnapshotTask &aTask);
+
+    HRESULT i_prepareDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
+                                          const Guid &machineId,
+                                          const Guid &snapshotId,
+                                          bool fOnlineMergePossible,
+                                          MediumLockList *aVMMALockList,
+                                          ComObjPtr<Medium> &aSource,
+                                          ComObjPtr<Medium> &aTarget,
+                                          bool &fMergeForward,
+                                          ComObjPtr<Medium> &pParentForTarget,
+                                          MediumLockList * &aChildrenToReparent,
+                                          bool &fNeedOnlineMerge,
+                                          MediumLockList * &aMediumLockList,
+                                          ComPtr<IToken> &aHDLockToken);
+    void i_cancelDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
+                                      const ComObjPtr<Medium> &aSource,
+                                      MediumLockList *aChildrenToReparent,
+                                      bool fNeedsOnlineMerge,
+                                      MediumLockList *aMediumLockList,
+                                      const ComPtr<IToken> &aHDLockToken,
+                                      const Guid &aMediumId,
+                                      const Guid &aSnapshotId);
+    HRESULT i_onlineMergeMedium(const ComObjPtr<MediumAttachment> &aMediumAttachment,
+                                const ComObjPtr<Medium> &aSource,
+                                const ComObjPtr<Medium> &aTarget,
+                                bool fMergeForward,
+                                const ComObjPtr<Medium> &pParentForTarget,
+                                MediumLockList *aChildrenToReparent,
+                                MediumLockList *aMediumLockList,
+                                ComObjPtr<Progress> &aProgress,
+                                bool *pfNeedsMachineSaveSettings);
+
+    HRESULT i_setMachineState(MachineState_T aMachineState);
+    HRESULT i_updateMachineStateOnClient();
 
     HRESULT mRemoveSavedState;
@@ -1277,15 +1470,15 @@
     // public methods only for internal purposes
 
-    virtual bool isSnapshotMachine() const
+    virtual bool i_isSnapshotMachine() const
     {
         return true;
     }
 
-    HRESULT onSnapshotChange(Snapshot *aSnapshot);
+    HRESULT i_onSnapshotChange(Snapshot *aSnapshot);
 
     // unsafe inline public methods for internal purposes only (ensure there is
     // a caller and a read lock before calling them!)
 
-    const Guid& getSnapshotId() const { return mSnapshotId; }
+    const Guid& i_getSnapshotId() const { return mSnapshotId; }
 
 private:
@@ -1302,8 +1495,8 @@
 // third party methods that depend on SnapshotMachine definition
 
-inline const Guid &Machine::getSnapshotId() const
+inline const Guid &Machine::i_getSnapshotId() const
 {
-    return (isSnapshotMachine())
-                ? static_cast<const SnapshotMachine*>(this)->getSnapshotId()
+    return (i_isSnapshotMachine())
+                ? static_cast<const SnapshotMachine*>(this)->i_getSnapshotId()
                 : Guid::Empty;
 }
Index: /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h	(revision 51497)
+++ /trunk/src/VBox/Main/include/USBDeviceFilterImpl.h	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -178,5 +178,5 @@
 
     // util::Lockable interface
-    RWLockHandle *i_lockHandle() const;
+    RWLockHandle *lockHandle() const;
 
 private:
Index: /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp	(revision 51498)
@@ -57,5 +57,6 @@
 * @return
 */
-STDMETHODIMP Machine::ExportTo(IAppliance *aAppliance, IN_BSTR location, IVirtualSystemDescription **aDescription)
+HRESULT Machine::exportTo(const ComPtr<IAppliance> &aAppliance, const com::Utf8Str &aLocation,
+                          ComPtr<IVirtualSystemDescription> &aDescription)
 {
     HRESULT rc = S_OK;
@@ -64,17 +65,13 @@
         return E_POINTER;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     ComObjPtr<VirtualSystemDescription> pNewDesc;
 
     try
     {
-        Appliance *pAppliance = static_cast<Appliance*>(aAppliance);
-        AutoCaller autoCaller1(pAppliance);
-        if (FAILED(autoCaller1.rc())) return autoCaller1.rc();
+        IAppliance *iAppliance = aAppliance;
+        Appliance *pAppliance = static_cast<Appliance*>(iAppliance);
 
         LocationInfo locInfo;
-        i_parseURI(location, locInfo);
+        i_parseURI(aLocation, locInfo);
         // create a new virtual system to store in the appliance
         rc = pNewDesc.createObject();
@@ -92,5 +89,5 @@
         if (SUCCEEDED(rc))
         {
-            for (unsigned i = 0; i < usbControllers.size(); i++)
+            for (unsigned i = 0; i < usbControllers.size(); ++i)
             {
                 USBControllerType_T enmType;
@@ -509,5 +506,5 @@
 
 //     <const name="NetworkAdapter" />
-        uint32_t maxNetworkAdapters = Global::getMaxNetworkAdapters(getChipsetType());
+        uint32_t maxNetworkAdapters = Global::getMaxNetworkAdapters(i_getChipsetType());
         size_t a;
         for (a = 0; a < maxNetworkAdapters; ++a)
@@ -557,5 +554,5 @@
         /* We return the new description to the caller */
         ComPtr<IVirtualSystemDescription> copy(pNewDesc);
-        copy.queryInterfaceTo(aDescription);
+        copy.queryInterfaceTo(aDescription.asOutParam());
 
         AutoWriteLock alock(pAppliance COMMA_LOCKVAL_SRC_POS);
@@ -1844,5 +1841,5 @@
         AutoWriteLock machineLock(vsdescThis->m->pMachine COMMA_LOCKVAL_SRC_POS);
         // fill the machine config
-        vsdescThis->m->pMachine->copyMachineDataToSettings(*pConfig);
+        vsdescThis->m->pMachine->i_copyMachineDataToSettings(*pConfig);
 
         // Apply export tweaks to machine settings
@@ -2286,5 +2283,6 @@
             Utf8Str strMfFileName = Utf8Str(strMfFilePath).stripPath();
             pTask->pProgress->SetNextOperation(BstrFmt(tr("Creating manifest file '%s'"), strMfFileName.c_str()).raw(),
-                                               m->ulWeightForManifestOperation);     // operation's weight, as set up with the IProgress originally);
+                                               m->ulWeightForManifestOperation);     // operation's weight, as set up
+                                                                                     // with the IProgress originally);
             PRTMANIFESTTEST paManifestFiles = (PRTMANIFESTTEST)RTMemAlloc(sizeof(RTMANIFESTTEST) * fileList.size());
             size_t i = 0;
@@ -2415,10 +2413,12 @@
                            tr("Cannot find source file '%s' (%Rrc)"), strTmpOvf.c_str(), vrc);
         /* Add the OVF file */
-        filesList.push_back(pair<Utf8Str, ULONG>(strTmpOvf, m->ulWeightForXmlOperation)); /* Use 1% of the total for the OVF file upload */
+        filesList.push_back(pair<Utf8Str, ULONG>(strTmpOvf, m->ulWeightForXmlOperation)); /* Use 1% of the
+                                                                                             total for the OVF file upload */
         /* Add the manifest file */
         if (m->fManifest)
         {
             Utf8Str strMfFile = Utf8Str(strTmpOvf).stripSuffix().append(".mf");
-            filesList.push_back(pair<Utf8Str, ULONG>(strMfFile , m->ulWeightForXmlOperation)); /* Use 1% of the total for the manifest file upload */
+            filesList.push_back(pair<Utf8Str, ULONG>(strMfFile , m->ulWeightForXmlOperation)); /* Use 1% of the total
+                                                                                                  for the manifest file upload */
         }
 
@@ -2430,5 +2430,6 @@
         {
             ComObjPtr<VirtualSystemDescription> vsdescThis = (*it);
-            std::list<VirtualSystemDescriptionEntry*> avsdeHDs = vsdescThis->i_findByType(VirtualSystemDescriptionType_HardDiskImage);
+            std::list<VirtualSystemDescriptionEntry*> avsdeHDs =
+                vsdescThis->i_findByType(VirtualSystemDescriptionType_HardDiskImage);
             std::list<VirtualSystemDescriptionEntry*>::const_iterator itH;
             for (itH = avsdeHDs.begin();
@@ -2450,5 +2451,6 @@
         }
         /* Next we have to upload the OVF & all disk images */
-        vrc = RTS3Create(&hS3, pTask->locInfo.strUsername.c_str(), pTask->locInfo.strPassword.c_str(), pTask->locInfo.strHostname.c_str(), "virtualbox-agent/" VBOX_VERSION_STRING);
+        vrc = RTS3Create(&hS3, pTask->locInfo.strUsername.c_str(), pTask->locInfo.strPassword.c_str(),
+                         pTask->locInfo.strHostname.c_str(), "virtualbox-agent/" VBOX_VERSION_STRING);
         if (RT_FAILURE(vrc))
             throw setError(VBOX_E_IPRT_ERROR,
Index: /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/AudioAdapterImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -228,5 +228,5 @@
         alock.release();
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_AudioAdapter);
+        mParent->i_setModified(Machine::IsModified_AudioAdapter);
     }
 
@@ -262,5 +262,5 @@
             alock.release();
             AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-            mParent->setModified(Machine::IsModified_AudioAdapter);
+            mParent->i_setModified(Machine::IsModified_AudioAdapter);
         }
         else
@@ -308,5 +308,5 @@
                 alock.release();
                 AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-                mParent->setModified(Machine::IsModified_AudioAdapter);
+                mParent->i_setModified(Machine::IsModified_AudioAdapter);
                 break;
             }
Index: /trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -207,5 +207,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -236,5 +236,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -268,5 +268,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -296,5 +296,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -323,5 +323,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -352,5 +352,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -381,5 +381,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -410,5 +410,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
@@ -438,5 +438,5 @@
     alock.release();
     AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);  // mParent is const, needs no locking
-    m->pMachine->setModified(Machine::IsModified_BIOS);
+    m->pMachine->i_setModified(Machine::IsModified_BIOS);
 
     return S_OK;
Index: /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/BandwidthControlImpl.cpp	(revision 51498)
@@ -415,5 +415,5 @@
     if (FAILED(rc)) return rc;
 
-    m->pParent->setModified(Machine::IsModified_BandwidthControl);
+    m->pParent->i_setModified(Machine::IsModified_BandwidthControl);
     m->llBandwidthGroups.backup();
     m->llBandwidthGroups->push_back(group);
@@ -439,5 +439,5 @@
 
     /* We can remove it now. */
-    m->pParent->setModified(Machine::IsModified_BandwidthControl);
+    m->pParent->i_setModified(Machine::IsModified_BandwidthControl);
     m->llBandwidthGroups.backup();
 
Index: /trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/BandwidthGroupImpl.cpp	(revision 51498)
@@ -245,5 +245,5 @@
     ComObjPtr<Machine> pMachine = m->pParent->i_getMachine();
     alock.release();
-    pMachine->onBandwidthGroupChange(this);
+    pMachine->i_onBandwidthGroupChange(this);
 
     return S_OK;
Index: /trunk/src/VBox/Main/src-server/ClientWatcher.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ClientWatcher.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/ClientWatcher.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -211,5 +211,5 @@
             {
                 /* machine mutex is released */
-                (machines[rc - WAIT_OBJECT_0 - 1])->checkForDeath();
+                (machines[rc - WAIT_OBJECT_0 - 1])->i_checkForDeath();
                 update = true;
             }
@@ -217,5 +217,5 @@
             {
                 /* machine mutex is abandoned due to client process termination */
-                (machines[rc - WAIT_ABANDONED_0 - 1])->checkForDeath();
+                (machines[rc - WAIT_ABANDONED_0 - 1])->i_checkForDeath();
                 update = true;
             }
@@ -224,5 +224,5 @@
                 /* spawned VM process has terminated (normally or abnormally) */
                 (spawnedMachines[rc - WAIT_OBJECT_0 - cnt - 1])->
-                    checkForSpawnFailure();
+                    i_checkForSpawnFailure();
                 update = true;
             }
@@ -253,5 +253,5 @@
 
                     ComObjPtr<SessionMachine> sm;
-                    if ((*it)->isSessionOpenOrClosing(sm))
+                    if ((*it)->i_isSessionOpenOrClosing(sm))
                     {
                         AutoCaller smCaller(sm);
@@ -259,5 +259,5 @@
                         {
                             AutoReadLock smLock(sm COMMA_LOCKVAL_SRC_POS);
-                            Machine::ClientToken *ct = sm->getClientToken();
+                            Machine::ClientToken *ct = sm->i_getClientToken();
                             if (ct)
                             {
@@ -285,5 +285,5 @@
                                    ("MAXIMUM_WAIT_OBJECTS reached"));
 
-                    if ((*it)->isSessionSpawning())
+                    if ((*it)->i_isSessionSpawning())
                     {
                         ULONG pid;
@@ -388,5 +388,5 @@
                             }
 #endif
-                            machines[semId]->checkForDeath();
+                            machines[semId]->i_checkForDeath();
                         }
                         update = true;
@@ -417,5 +417,5 @@
                                     }
 #endif
-                                    machines[i]->checkForDeath();
+                                    machines[i]->i_checkForDeath();
                                 }
                             }
@@ -433,5 +433,5 @@
                     for (size_t i = 0; i < cntSpawned; ++i)
                         updateSpawned |= (spawnedMachines[i])->
-                            checkForSpawnFailure();
+                            i_checkForSpawnFailure();
                 }
             }
@@ -464,5 +464,5 @@
 
                         ComObjPtr<SessionMachine> sm;
-                        if ((*it)->isSessionOpenOrClosing(sm))
+                        if ((*it)->i_isSessionOpenOrClosing(sm))
                         {
                             AutoCaller smCaller(sm);
@@ -470,5 +470,5 @@
                             {
                                 AutoReadLock smLock(sm COMMA_LOCKVAL_SRC_POS);
-                                ClientToken *ct = sm->getClientToken();
+                                ClientToken *ct = sm->i_getClientToken();
                                 if (ct)
                                 {
@@ -505,5 +505,5 @@
                          it != allMachines.end(); ++it)
                     {
-                        if ((*it)->isSessionSpawning())
+                        if ((*it)->i_isSessionSpawning())
                             spawnedMachines.push_back(*it);
                     }
@@ -589,5 +589,5 @@
                     {
                         ComObjPtr<SessionMachine> sm;
-                        if ((*it)->isSessionOpenOrClosing(sm))
+                        if ((*it)->i_isSessionOpenOrClosing(sm))
                             machines.push_back(sm);
                     }
@@ -606,5 +606,5 @@
                          ++it)
                     {
-                        if ((*it)->isSessionSpawning())
+                        if ((*it)->i_isSessionSpawning())
                             spawnedMachines.push_back(*it);
                     }
@@ -619,9 +619,9 @@
             update = false;
             for (size_t i = 0; i < cnt; ++i)
-                update |= (machines[i])->checkForDeath();
+                update |= (machines[i])->i_checkForDeath();
 
             updateSpawned = false;
             for (size_t i = 0; i < cntSpawned; ++i)
-                updateSpawned |= (spawnedMachines[i])->checkForSpawnFailure();
+                updateSpawned |= (spawnedMachines[i])->i_checkForSpawnFailure();
 
             /* reap child processes */
@@ -757,5 +757,5 @@
                          ++it)
                     {
-                        if ((*it)->isSessionSpawning())
+                        if ((*it)->i_isSessionSpawning())
                             spawnedMachines.push_back(*it);
                     }
@@ -771,5 +771,5 @@
             updateSpawned = false;
             for (size_t i = 0; i < cntSpawned; ++i)
-                updateSpawned |= (spawnedMachines[i])->checkForSpawnFailure();
+                updateSpawned |= (spawnedMachines[i])->i_checkForSpawnFailure();
 
             /* reap child processes */
Index: /trunk/src/VBox/Main/src-server/HostPower.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostPower.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/HostPower.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -168,5 +168,5 @@
                     if (FAILED(rc))
                     {
-                        LogRel(("SaveState '%s' failed with %Rhrc\n", pMachine->getName().c_str(), rc));
+                        LogRel(("SaveState '%s' failed with %Rhrc\n", pMachine->i_getName().c_str(), rc));
                         continue;
                     }
@@ -185,5 +185,5 @@
                     if (SUCCEEDED(rc))
                     {
-                        LogRel(("SaveState '%s' succeeded\n", pMachine->getName().c_str()));
+                        LogRel(("SaveState '%s' succeeded\n", pMachine->i_getName().c_str()));
                         ++saved;
                     }
Index: /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/HostUSBDeviceImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2005-2013 Oracle Corporation
+ * Copyright (C) 2005-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -332,5 +332,5 @@
             return setError(E_INVALIDARG,
                             tr("USB device '%s' with UUID {%RTuuid} is already captured by the virtual machine '%s'"),
-                            mName, mId.raw(), mMachine->getName().c_str());
+                            mName, mId.raw(), mMachine->i_getName().c_str());
         }
         if (mUniState >= kHostUSBDeviceState_FirstTransitional)
@@ -439,5 +439,5 @@
     LogFlowThisFunc(("{%s} Calling machine->onUSBDeviceAttach()...\n", mName));
     alock.release();
-    HRESULT hrc = aMachine->onUSBDeviceAttach(d, NULL, aMaskedIfs);
+    HRESULT hrc = aMachine->i_onUSBDeviceAttach(d, NULL, aMaskedIfs);
     LogFlowThisFunc(("{%s} Done machine->onUSBDeviceAttach()=%08X\n", mName, hrc));
 
@@ -518,5 +518,5 @@
     alock.release();
     LogFlowThisFunc(("{%s} Calling machine->onUSBDeviceDetach()...\n", mName));
-    HRESULT hrc = mMachine->onUSBDeviceDetach(mId.toUtf16().raw(), NULL);
+    HRESULT hrc = mMachine->i_onUSBDeviceDetach(mId.toUtf16().raw(), NULL);
     LogFlowThisFunc(("{%s} Done machine->onUSBDeviceDetach()=%Rhrc\n", mName, hrc));
     NOREF(hrc);
@@ -1701,6 +1701,7 @@
  * @note    The caller must own the write lock for this object.
  */
-bool HostUSBDevice::i_setState(HostUSBDeviceState aNewState, HostUSBDeviceState aNewPendingState /*= kHostUSBDeviceState_Invalid*/,
-                             HostUSBDeviceSubState aNewSubState /*= kHostUSBDeviceSubState_Default*/)
+bool HostUSBDevice::i_setState(HostUSBDeviceState aNewState,
+                               HostUSBDeviceState aNewPendingState /*= kHostUSBDeviceState_Invalid*/,
+                               HostUSBDeviceSubState aNewSubState /*= kHostUSBDeviceSubState_Default*/)
 {
     Assert(isWriteLockOnCurrentThread());
Index: /trunk/src/VBox/Main/src-server/MachineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/MachineImpl.cpp	(revision 51498)
@@ -167,5 +167,5 @@
     mVideoCaptureFPS = 25;
     mVideoCaptureEnabled = false;
-    for (unsigned i = 0; i < RT_ELEMENTS(maVideoCaptureScreens); i++)
+    for (unsigned i = 0; i < RT_ELEMENTS(maVideoCaptureScreens); ++i)
         maVideoCaptureScreens[i] = true;
 
@@ -209,5 +209,5 @@
     mEmulatedUSBCardReaderEnabled = FALSE;
 
-    for (size_t i = 0; i < RT_ELEMENTS(mCPUAttached); i++)
+    for (size_t i = 0; i < RT_ELEMENTS(mCPUAttached); ++i)
         mCPUAttached[i] = false;
 
@@ -303,5 +303,5 @@
     if (FAILED(rc)) return rc;
 
-    rc = tryCreateMachineConfigFile(fForceOverwrite);
+    rc = i_tryCreateMachineConfigFile(fForceOverwrite);
     if (FAILED(rc)) return rc;
 
@@ -329,5 +329,5 @@
         // with the machine file; say so if the settings file name is the same as the
         // settings file parent directory (machine directory)
-        mUserData->s.fNameSync = isInOwnDir();
+        mUserData->s.fNameSync = i_isInOwnDir();
 
         // initialize the default snapshots folder
@@ -358,8 +358,8 @@
         /* At this point the changing of the current state modification
          * flag is allowed. */
-        allowStateModification();
+        i_allowStateModification();
 
         /* commit all changes made during the initialization */
-        commit();
+        i_commit();
     }
 
@@ -421,5 +421,5 @@
         mData->mRegistered = TRUE;
         // now load the settings from XML:
-        rc = registeredInit();
+        rc = i_registeredInit();
             // this calls initDataAndChildObjects() and loadSettings()
     }
@@ -454,5 +454,5 @@
                 unconst(mData->mUuid) = mData->pMachineConfigFile->uuid;
 
-                rc = loadMachineDataFromSettings(*mData->pMachineConfigFile,
+                rc = i_loadMachineDataFromSettings(*mData->pMachineConfigFile,
                                                  NULL /* puuidRegistry */);
                 if (FAILED(rc)) throw rc;
@@ -460,7 +460,7 @@
                 /* At this point the changing of the current state modification
                  * flag is allowed. */
-                allowStateModification();
-
-                commit();
+                i_allowStateModification();
+
+                i_commit();
             }
             catch (HRESULT err)
@@ -487,5 +487,5 @@
             // uninit media from this machine's media registry, or else
             // reloading the settings will fail
-            mParent->i_unregisterMachineMedia(getId());
+            mParent->i_unregisterMachineMedia(i_getId());
         }
     }
@@ -533,5 +533,5 @@
     if (FAILED(rc)) return rc;
 
-    rc = tryCreateMachineConfigFile(false /* fForceOverwrite */);
+    rc = i_tryCreateMachineConfigFile(false /* fForceOverwrite */);
     if (FAILED(rc)) return rc;
 
@@ -549,6 +549,6 @@
         unconst(mData->mUuid).create();
 
-        rc = loadMachineDataFromSettings(config,
-                                         &mData->mUuid); // puuidRegistry: initialize media with this registry ID
+        rc = i_loadMachineDataFromSettings(config,
+                                           &mData->mUuid); // puuidRegistry: initialize media with this registry ID
 
         // override VM name as well, it may be different
@@ -559,8 +559,8 @@
             /* At this point the changing of the current state modification
              * flag is allowed. */
-            allowStateModification();
+            i_allowStateModification();
 
             /* commit all changes made during the initialization */
-            commit();
+            i_commit();
         }
     }
@@ -574,12 +574,13 @@
         {
             /* Ignore all errors from unregistering, they would destroy
-             * the more interesting error information we already have,
-             * pinpointing the issue with the VM config. */
+-            * the more interesting error information we already have,
+-            * pinpointing the issue with the VM config. */
             ErrorInfoKeeper eik;
+
             autoInitSpan.setLimited();
 
             // uninit media from this machine's media registry, or else
             // reloading the settings will fail
-            mParent->i_unregisterMachineMedia(getId());
+            mParent->i_unregisterMachineMedia(i_getId());
         }
     }
@@ -639,5 +640,5 @@
  * @return
  */
-HRESULT Machine::tryCreateMachineConfigFile(bool fForceOverwrite)
+HRESULT Machine::i_tryCreateMachineConfigFile(bool fForceOverwrite)
 {
     HRESULT rc = S_OK;
@@ -689,8 +690,8 @@
  *  @note Subclasses must not call this method.
  */
-HRESULT Machine::registeredInit()
-{
-    AssertReturn(!isSessionMachine(), E_FAIL);
-    AssertReturn(!isSnapshotMachine(), E_FAIL);
+HRESULT Machine::i_registeredInit()
+{
+    AssertReturn(!i_isSessionMachine(), E_FAIL);
+    AssertReturn(!i_isSnapshotMachine(), E_FAIL);
     AssertReturn(mData->mUuid.isValid(), E_FAIL);
     AssertReturn(!mData->mAccessible, E_FAIL);
@@ -719,6 +720,6 @@
                                mParent->i_settingsFilePath().c_str());
 
-            rc = loadMachineDataFromSettings(*mData->pMachineConfigFile,
-                                             NULL /* const Guid *puuidRegistry */);
+            rc = i_loadMachineDataFromSettings(*mData->pMachineConfigFile,
+                                               NULL /* const Guid *puuidRegistry */);
             if (FAILED(rc)) throw rc;
         }
@@ -744,5 +745,5 @@
 
         /* commit all changes made during loading the settings file */
-        commit(); // @todo r=dj why do we need a commit during init?!? this is very expensive
+        i_commit(); // @todo r=dj why do we need a commit during init?!? this is very expensive
         /// @todo r=klaus for some reason the settings loading logic backs up
         // the settings, and therefore a commit is needed. Should probably be changed.
@@ -761,9 +762,9 @@
 
         /* rollback all changes */
-        rollback(false /* aNotify */);
+        i_rollback(false /* aNotify */);
 
         // uninit media from this machine's media registry, or else
         // reloading the settings will fail
-        mParent->i_unregisterMachineMedia(getId());
+        mParent->i_unregisterMachineMedia(i_getId());
 
         /* uninitialize the common part to make sure all data is reset to
@@ -801,5 +802,5 @@
         {
             AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-            saveSettings(NULL, Machine::SaveS_Force);
+            i_saveSettings(NULL, Machine::SaveS_Force);
         }
     }
@@ -810,6 +811,6 @@
         return;
 
-    Assert(!isSnapshotMachine());
-    Assert(!isSessionMachine());
+    Assert(!i_isSnapshotMachine());
+    Assert(!i_isSessionMachine());
     Assert(!!mData);
 
@@ -840,5 +841,5 @@
             LogWarningThisFunc(("Setting state to Aborted!\n"));
             /* set machine state using SessionMachine reimplementation */
-            static_cast<Machine*>(mData->mSession.mMachine)->setMachineState(MachineState_Aborted);
+            static_cast<Machine*>(mData->mSession.mMachine)->i_setMachineState(MachineState_Aborted);
         }
 
@@ -853,5 +854,5 @@
 
     // uninit media from this machine's media registry, if they're still there
-    Guid uuidMachine(getId());
+    Guid uuidMachine(i_getId());
 
     /* the lock is no more necessary (SessionMachine is uninitialized) */
@@ -870,5 +871,5 @@
     {
         LogWarningThisFunc(("Discarding unsaved settings changes!\n"));
-        rollback(false /* aNotify */);
+        i_rollback(false /* aNotify */);
     }
 
@@ -882,30 +883,18 @@
 }
 
-// IMachine properties
+// Wrapped IMachine properties
 /////////////////////////////////////////////////////////////////////////////
-
-STDMETHODIMP Machine::COMGETTER(Parent)(IVirtualBox **aParent)
-{
-    CheckComArgOutPointerValid(aParent);
-
-    AutoLimitedCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getParent(ComPtr<IVirtualBox> &aParent)
+{
     /* mParent is constant during life time, no need to lock */
     ComObjPtr<VirtualBox> pVirtualBox(mParent);
-    pVirtualBox.queryInterfaceTo(aParent);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(Accessible)(BOOL *aAccessible)
-{
-    CheckComArgOutPointerValid(aAccessible);
-
-    AutoLimitedCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    LogFlowThisFunc(("ENTER\n"));
-
+    pVirtualBox.queryInterfaceTo(aParent.asOutParam());
+
+    return S_OK;
+}
+
+
+HRESULT Machine::getAccessible(BOOL *aAccessible)
+{
     /* In some cases (medium registry related), it is necessary to be able to
      * go through the list of all machines. Happens when an inaccessible VM
@@ -936,5 +925,5 @@
         }
 
-        rc = registeredInit();
+        rc = i_registeredInit();
 
         if (SUCCEEDED(rc) && mData->mAccessible)
@@ -957,11 +946,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(AccessError)(IVirtualBoxErrorInfo **aAccessError)
-{
-    CheckComArgOutPointerValid(aAccessError);
-
-    AutoLimitedCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getAccessError(ComPtr<IVirtualBoxErrorInfo> &aAccessError)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -983,5 +967,5 @@
                         Utf8Str(mData->mAccessError.getComponent()).c_str(),
                         Utf8Str(mData->mAccessError.getText()));
-        rc = errorInfo.queryInterfaceTo(aAccessError);
+        rc = errorInfo.queryInterfaceTo(aAccessError.asOutParam());
     }
 
@@ -989,25 +973,15 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(Name)(BSTR *aName)
-{
-    CheckComArgOutPointerValid(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getName(com::Utf8Str &aName)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strName.cloneTo(aName);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(Name)(IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aName = mUserData->s.strName;
+
+    return S_OK;
+}
+
+HRESULT Machine::setName(const com::Utf8Str &aName)
+{
     // prohibit setting a UUID only as the machine name, or else it can
     // never be found by findMachine()
@@ -1019,8 +993,8 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
     mUserData->s.strName = aName;
@@ -1029,23 +1003,15 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(Description)(BSTR *aDescription)
-{
-    CheckComArgOutPointerValid(aDescription);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getDescription(com::Utf8Str &aDescription)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strDescription.cloneTo(aDescription);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(Description)(IN_BSTR aDescription)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aDescription = mUserData->s.strDescription;
+
+    return S_OK;
+}
+
+HRESULT Machine::setDescription(const com::Utf8Str &aDescription)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1053,8 +1019,8 @@
     // significantly, but play safe by not messing around while complex
     // activities are going on
-    HRESULT rc = checkStateDependency(MutableOrSavedStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
     mUserData->s.strDescription = aDescription;
@@ -1063,52 +1029,29 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(Id)(BSTR *aId)
-{
-    CheckComArgOutPointerValid(aId);
-
-    AutoLimitedCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getId(com::Guid &aId)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mUuid.toUtf16().cloneTo(aId);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(Groups)(ComSafeArrayOut(BSTR, aGroups))
-{
-    CheckComArgOutSafeArrayPointerValid(aGroups);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aId = mData->mUuid;
+
+    return S_OK;
+}
+
+HRESULT Machine::getGroups(std::vector<com::Utf8Str> &aGroups)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    SafeArray<BSTR> groups(mUserData->s.llGroups.size());
+    aGroups.resize(mUserData->s.llGroups.size());
     size_t i = 0;
     for (StringsList::const_iterator it = mUserData->s.llGroups.begin();
-         it != mUserData->s.llGroups.end();
-         ++it, i++)
-    {
-        Bstr tmp = *it;
-        tmp.cloneTo(&groups[i]);
-    }
-    groups.detachTo(ComSafeArrayOutArg(aGroups));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(Groups)(ComSafeArrayIn(IN_BSTR, aGroups))
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-    std::vector<com::Utf8Str> tmplist;
-    SafeArray<IN_BSTR> tmp(ComSafeArrayInArg(aGroups));
-    tmplist.resize(tmp.size());
-    for (size_t i = 0; i < tmp.size(); ++i)
-        tmplist[i] = Utf8Str(tmp[i]);
-
+         it != mUserData->s.llGroups.end(); ++it, ++i)
+        aGroups[i] = (*it);
+
+    return S_OK;
+}
+
+HRESULT Machine::setGroups(const std::vector<com::Utf8Str> &aGroups)
+{
     StringsList llGroups;
-    HRESULT rc = mParent->i_convertMachineGroups(tmplist, &llGroups);
+    HRESULT rc = mParent->i_convertMachineGroups(aGroups, &llGroups);
     if (FAILED(rc))
         return rc;
@@ -1117,8 +1060,8 @@
 
     // changing machine groups is possible while the VM is offline
-    rc = checkStateDependency(OfflineStateDep);
+    rc = i_checkStateDependency(OfflineStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
     mUserData->s.llGroups = llGroups;
@@ -1127,28 +1070,18 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(OSTypeId)(BSTR *aOSTypeId)
-{
-    CheckComArgOutPointerValid(aOSTypeId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getOSTypeId(com::Utf8Str &aOSTypeId)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strOsType.cloneTo(aOSTypeId);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(OSTypeId)(IN_BSTR aOSTypeId)
-{
-    CheckComArgStrNotEmptyOrNull(aOSTypeId);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aOSTypeId = mUserData->s.strOsType;
+
+    return S_OK;
+}
+
+HRESULT Machine::setOSTypeId(const com::Utf8Str &aOSTypeId)
+{
     /* look up the object by Id to check it is valid */
     ComPtr<IGuestOSType> guestOSType;
-    HRESULT rc = mParent->GetGuestOSType(aOSTypeId, guestOSType.asOutParam());
+    HRESULT rc = mParent->GetGuestOSType(Bstr(aOSTypeId).raw(), guestOSType.asOutParam());
     if (FAILED(rc)) return rc;
 
@@ -1161,8 +1094,8 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    rc = checkStateDependency(MutableStateDep);
+    rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
     mUserData->s.strOsType = osTypeId;
@@ -1171,12 +1104,6 @@
 }
 
-
-STDMETHODIMP Machine::COMGETTER(FirmwareType)(FirmwareType_T *aFirmwareType)
-{
-    CheckComArgOutPointerValid(aFirmwareType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getFirmwareType(FirmwareType_T *aFirmwareType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1186,14 +1113,12 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(FirmwareType)(FirmwareType_T aFirmwareType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setFirmwareType(FirmwareType_T aFirmwareType)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mFirmwareType = aFirmwareType;
@@ -1202,11 +1127,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(KeyboardHIDType)(KeyboardHIDType_T *aKeyboardHIDType)
-{
-    CheckComArgOutPointerValid(aKeyboardHIDType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getKeyboardHIDType(KeyboardHIDType_T *aKeyboardHIDType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1216,14 +1136,12 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(KeyboardHIDType)(KeyboardHIDType_T  aKeyboardHIDType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setKeyboardHIDType(KeyboardHIDType_T aKeyboardHIDType)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mKeyboardHIDType = aKeyboardHIDType;
@@ -1232,11 +1150,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(PointingHIDType)(PointingHIDType_T *aPointingHIDType)
-{
-    CheckComArgOutPointerValid(aPointingHIDType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getPointingHIDType(PointingHIDType_T *aPointingHIDType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1246,14 +1159,12 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(PointingHIDType)(PointingHIDType_T  aPointingHIDType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setPointingHIDType(PointingHIDType_T aPointingHIDType)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mPointingHIDType = aPointingHIDType;
@@ -1262,11 +1173,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(ChipsetType)(ChipsetType_T *aChipsetType)
-{
-    CheckComArgOutPointerValid(aChipsetType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getChipsetType(ChipsetType_T *aChipsetType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1276,16 +1182,14 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(ChipsetType)(ChipsetType_T aChipsetType)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setChipsetType(ChipsetType_T aChipsetType)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     if (aChipsetType != mHWData->mChipsetType)
     {
-        setModified(IsModified_MachineData);
+        i_setModified(IsModified_MachineData);
         mHWData.backup();
         mHWData->mChipsetType = aChipsetType;
@@ -1310,11 +1214,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(ParavirtProvider)(ParavirtProvider_T *aParavirtProvider)
-{
-    CheckComArgOutPointerValid(aParavirtProvider);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getParavirtProvider(ParavirtProvider_T *aParavirtProvider)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1324,16 +1223,14 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(ParavirtProvider)(ParavirtProvider_T aParavirtProvider)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setParavirtProvider(ParavirtProvider_T aParavirtProvider)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     if (aParavirtProvider != mHWData->mParavirtProvider)
     {
-        setModified(IsModified_MachineData);
+        i_setModified(IsModified_MachineData);
         mHWData.backup();
         mHWData->mParavirtProvider = aParavirtProvider;
@@ -1343,148 +1240,115 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(HardwareVersion)(BSTR *aHWVersion)
-{
-    CheckComArgOutPointerValid(aHWVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getHardwareVersion(com::Utf8Str &aHardwareVersion)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mHWData->mHWVersion.cloneTo(aHWVersion);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(HardwareVersion)(IN_BSTR aHWVersion)
+    aHardwareVersion = mHWData->mHWVersion;
+
+    return S_OK;
+}
+
+HRESULT Machine::setHardwareVersion(const com::Utf8Str &aHardwareVersion)
 {
     /* check known version */
-    Utf8Str hwVersion = aHWVersion;
+    Utf8Str hwVersion = aHardwareVersion;
     if (    hwVersion.compare("1") != 0
         &&  hwVersion.compare("2") != 0)
         return setError(E_INVALIDARG,
-                        tr("Invalid hardware version: %ls\n"), aHWVersion);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        tr("Invalid hardware version: %s\n"), aHardwareVersion.c_str());
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mHWVersion = hwVersion;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(HardwareUUID)(BSTR *aUUID)
-{
-    CheckComArgOutPointerValid(aUUID);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mHWVersion = aHardwareVersion;
+
+    return S_OK;
+}
+
+HRESULT Machine::getHardwareUUID(com::Guid &aHardwareUUID)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     if (!mHWData->mHardwareUUID.isZero())
-        mHWData->mHardwareUUID.toUtf16().cloneTo(aUUID);
+        aHardwareUUID = mHWData->mHardwareUUID;
     else
-        mData->mUuid.toUtf16().cloneTo(aUUID);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(HardwareUUID)(IN_BSTR aUUID)
-{
-    Guid hardwareUUID(aUUID);
-    if (!hardwareUUID.isValid())
+        aHardwareUUID = mData->mUuid;
+
+    return S_OK;
+}
+
+HRESULT Machine::setHardwareUUID(const com::Guid &aHardwareUUID)
+{
+    if (!aHardwareUUID.isValid())
         return E_INVALIDARG;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    if (hardwareUUID == mData->mUuid)
+    if (aHardwareUUID == mData->mUuid)
         mHWData->mHardwareUUID.clear();
     else
-        mHWData->mHardwareUUID = hardwareUUID;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(MemorySize)(ULONG *memorySize)
-{
-    CheckComArgOutPointerValid(memorySize);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        mHWData->mHardwareUUID = aHardwareUUID;
+
+    return S_OK;
+}
+
+HRESULT Machine::getMemorySize(ULONG *aMemorySize)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *memorySize = mHWData->mMemorySize;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(MemorySize)(ULONG memorySize)
+    *aMemorySize = mHWData->mMemorySize;
+
+    return S_OK;
+}
+
+HRESULT Machine::setMemorySize(ULONG aMemorySize)
 {
     /* check RAM limits */
-    if (    memorySize < MM_RAM_MIN_IN_MB
-         || memorySize > MM_RAM_MAX_IN_MB
+    if (    aMemorySize < MM_RAM_MIN_IN_MB
+         || aMemorySize > MM_RAM_MAX_IN_MB
        )
         return setError(E_INVALIDARG,
                         tr("Invalid RAM size: %lu MB (must be in range [%lu, %lu] MB)"),
-                        memorySize, MM_RAM_MIN_IN_MB, MM_RAM_MAX_IN_MB);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aMemorySize, MM_RAM_MIN_IN_MB, MM_RAM_MAX_IN_MB);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mMemorySize = memorySize;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(CPUCount)(ULONG *CPUCount)
-{
-    CheckComArgOutPointerValid(CPUCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mMemorySize = aMemorySize;
+
+    return S_OK;
+}
+
+HRESULT Machine::getCPUCount(ULONG *aCPUCount)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *CPUCount = mHWData->mCPUCount;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(CPUCount)(ULONG CPUCount)
+    *aCPUCount = mHWData->mCPUCount;
+
+    return S_OK;
+}
+
+HRESULT Machine::setCPUCount(ULONG aCPUCount)
 {
     /* check CPU limits */
-    if (    CPUCount < SchemaDefs::MinCPUCount
-         || CPUCount > SchemaDefs::MaxCPUCount
+    if (    aCPUCount < SchemaDefs::MinCPUCount
+         || aCPUCount > SchemaDefs::MaxCPUCount
        )
         return setError(E_INVALIDARG,
                         tr("Invalid virtual CPU count: %lu (must be in range [%lu, %lu])"),
-                        CPUCount, SchemaDefs::MinCPUCount, SchemaDefs::MaxCPUCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aCPUCount, SchemaDefs::MinCPUCount, SchemaDefs::MaxCPUCount);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -1493,5 +1357,5 @@
     if (mHWData->mCPUHotPlugEnabled)
     {
-        for (unsigned idx = CPUCount; idx < SchemaDefs::MaxCPUCount; idx++)
+        for (unsigned idx = aCPUCount; idx < SchemaDefs::MaxCPUCount; idx++)
         {
             if (mHWData->mCPUAttached[idx])
@@ -1499,104 +1363,85 @@
                                 tr("There is still a CPU attached to socket %lu."
                                    "Detach the CPU before removing the socket"),
-                                CPUCount, idx+1);
-        }
-    }
-
-    HRESULT rc = checkStateDependency(MutableStateDep);
+                                aCPUCount, idx+1);
+        }
+    }
+
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mCPUCount = CPUCount;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(CPUExecutionCap)(ULONG *aExecutionCap)
-{
-    CheckComArgOutPointerValid(aExecutionCap);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mCPUCount = aCPUCount;
+
+    return S_OK;
+}
+
+HRESULT Machine::getCPUExecutionCap(ULONG *aCPUExecutionCap)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aExecutionCap = mHWData->mCpuExecutionCap;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(CPUExecutionCap)(ULONG aExecutionCap)
+    *aCPUExecutionCap = mHWData->mCpuExecutionCap;
+
+    return S_OK;
+}
+
+HRESULT Machine::setCPUExecutionCap(ULONG aCPUExecutionCap)
 {
     HRESULT rc = S_OK;
 
     /* check throttle limits */
-    if (    aExecutionCap < 1
-         || aExecutionCap > 100
+    if (    aCPUExecutionCap < 1
+         || aCPUExecutionCap > 100
        )
         return setError(E_INVALIDARG,
                         tr("Invalid CPU execution cap value: %lu (must be in range [%lu, %lu])"),
-                        aExecutionCap, 1, 100);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aCPUExecutionCap, 1, 100);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     alock.release();
-    rc = onCPUExecutionCapChange(aExecutionCap);
+    rc = i_onCPUExecutionCapChange(aCPUExecutionCap);
     alock.acquire();
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mCpuExecutionCap = aExecutionCap;
+    mHWData->mCpuExecutionCap = aCPUExecutionCap;
 
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
-
-    return S_OK;
-}
-
-
-STDMETHODIMP Machine::COMGETTER(CPUHotPlugEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        i_saveSettings(NULL);
+
+    return S_OK;
+}
+
+HRESULT Machine::getCPUHotPlugEnabled(BOOL *aCPUHotPlugEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mCPUHotPlugEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(CPUHotPlugEnabled)(BOOL aEnabled)
+    *aCPUHotPlugEnabled = mHWData->mCPUHotPlugEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setCPUHotPlugEnabled(BOOL aCPUHotPlugEnabled)
 {
     HRESULT rc = S_OK;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    rc = checkStateDependency(MutableStateDep);
+    rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    if (mHWData->mCPUHotPlugEnabled != aEnabled)
-    {
-        if (aEnabled)
-        {
-            setModified(IsModified_MachineData);
+    if (mHWData->mCPUHotPlugEnabled != aCPUHotPlugEnabled)
+    {
+        if (aCPUHotPlugEnabled)
+        {
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
 
             /* Add the amount of CPUs currently attached */
-            for (unsigned i = 0; i < mHWData->mCPUCount; i++)
-            {
+            for (unsigned i = 0; i < mHWData->mCPUCount; ++i)
                 mHWData->mCPUAttached[i] = true;
-            }
         }
         else
@@ -1609,5 +1454,5 @@
             unsigned iHighestId = 0;
 
-            for (unsigned i = 0; i < SchemaDefs::MaxCPUCount; i++)
+            for (unsigned i = 0; i < SchemaDefs::MaxCPUCount; ++i)
             {
                 if (mHWData->mCPUAttached[i])
@@ -1623,116 +1468,98 @@
                                 tr("CPU hotplugging can't be disabled because the maximum number of CPUs is not equal to the amount of CPUs attached"));
 
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
         }
     }
 
-    mHWData->mCPUHotPlugEnabled = aEnabled;
+    mHWData->mCPUHotPlugEnabled = aCPUHotPlugEnabled;
 
     return rc;
 }
 
-STDMETHODIMP Machine::COMGETTER(EmulatedUSBCardReaderEnabled)(BOOL *aEnabled)
+HRESULT Machine::getEmulatedUSBCardReaderEnabled(BOOL *aEmulatedUSBCardReaderEnabled)
 {
 #ifdef VBOX_WITH_USB_CARDREADER
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mEmulatedUSBCardReaderEnabled;
+    *aEmulatedUSBCardReaderEnabled = mHWData->mEmulatedUSBCardReaderEnabled;
 
     return S_OK;
 #else
-    NOREF(aEnabled);
+    NOREF(aEmulatedUSBCardReaderEnabled);
     return E_NOTIMPL;
 #endif
 }
 
-STDMETHODIMP Machine::COMSETTER(EmulatedUSBCardReaderEnabled)(BOOL aEnabled)
+HRESULT Machine::setEmulatedUSBCardReaderEnabled(BOOL aEmulatedUSBCardReaderEnabled)
 {
 #ifdef VBOX_WITH_USB_CARDREADER
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mEmulatedUSBCardReaderEnabled = aEnabled;
+    mHWData->mEmulatedUSBCardReaderEnabled = aEmulatedUSBCardReaderEnabled;
 
     return S_OK;
 #else
-    NOREF(aEnabled);
+    NOREF(aEmulatedUSBCardReaderEnabled);
     return E_NOTIMPL;
 #endif
 }
 
-STDMETHODIMP Machine::COMGETTER(HPETEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::getHPETEnabled(BOOL *aHPETEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mHPETEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(HPETEnabled)(BOOL aEnabled)
+    *aHPETEnabled = mHWData->mHPETEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setHPETEnabled(BOOL aHPETEnabled)
 {
     HRESULT rc = S_OK;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    rc = checkStateDependency(MutableStateDep);
+    rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
 
-    mHWData->mHPETEnabled = aEnabled;
+    mHWData->mHPETEnabled = aHPETEnabled;
 
     return rc;
 }
 
-STDMETHODIMP Machine::COMGETTER(VideoCaptureEnabled)(BOOL *fEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getVideoCaptureEnabled(BOOL *aVideoCaptureEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *fEnabled = mHWData->mVideoCaptureEnabled;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureEnabled)(BOOL fEnabled)
+    *aVideoCaptureEnabled = mHWData->mVideoCaptureEnabled;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureEnabled(BOOL aVideoCaptureEnabled)
 {
     HRESULT rc = S_OK;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureEnabled = fEnabled;
+    mHWData->mVideoCaptureEnabled = aVideoCaptureEnabled;
 
     alock.release();
-    rc = onVideoCaptureChange();
+    rc = i_onVideoCaptureChange();
     alock.acquire();
     if (FAILED(rc))
     {
         /*
-         * Normally we would do the actual change _after_ onVideoCaptureChange() succeeded.
+         * Normally we would do the actual change _after_ i_onVideoCaptureChange() succeeded.
          * We cannot do this because that function uses Machine::GetVideoCaptureEnabled to
          * determine if it should start or stop capturing. Therefore we need to manually
@@ -1745,28 +1572,21 @@
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
+        i_saveSettings(NULL);
 
     return rc;
 }
 
-STDMETHODIMP Machine::COMGETTER(VideoCaptureScreens)(ComSafeArrayOut(BOOL, aScreens))
-{
-    CheckComArgOutSafeArrayPointerValid(aScreens);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getVideoCaptureScreens(std::vector<BOOL> &aVideoCaptureScreens)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    SafeArray<BOOL> screens(mHWData->mMonitorCount);
-    for (unsigned i = 0; i < screens.size(); i++)
-        screens[i] = mHWData->maVideoCaptureScreens[i];
-    screens.detachTo(ComSafeArrayOutArg(aScreens));
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureScreens)(ComSafeArrayIn(BOOL, aScreens))
-{
-    SafeArray<BOOL> screens(ComSafeArrayInArg(aScreens));
+    aVideoCaptureScreens.resize(mHWData->mMonitorCount);
+    for (unsigned i = 0; i < mHWData->mMonitorCount; ++i)
+        aVideoCaptureScreens[i] = mHWData->maVideoCaptureScreens[i];
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureScreens(const std::vector<BOOL> &aVideoCaptureScreens)
+{
+    SafeArray<BOOL> screens(aVideoCaptureScreens);
     AssertReturn(screens.size() <= RT_ELEMENTS(mHWData->maVideoCaptureScreens), E_INVALIDARG);
     bool fChanged = false;
@@ -1774,5 +1594,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    for (unsigned i = 0; i < screens.size(); i++)
+    for (unsigned i = 0; i < screens.size(); ++i)
     {
         if (mHWData->maVideoCaptureScreens[i] != RT_BOOL(screens[i]))
@@ -1785,40 +1605,30 @@
     {
         alock.release();
-        HRESULT rc = onVideoCaptureChange();
+        HRESULT rc = i_onVideoCaptureChange();
         alock.acquire();
         if (FAILED(rc)) return rc;
-        setModified(IsModified_MachineData);
+        i_setModified(IsModified_MachineData);
 
         /** Save settings if online - @todo why is this required? -- @bugref{6818} */
         if (Global::IsOnline(mData->mMachineState))
-            saveSettings(NULL);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(VideoCaptureFile)(BSTR *apFile)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+            i_saveSettings(NULL);
+    }
+
+    return S_OK;
+}
+
+HRESULT Machine::getVideoCaptureFile(com::Utf8Str &aVideoCaptureFile)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     if (mHWData->mVideoCaptureFile.isEmpty())
-    {
-        Utf8Str defaultFile;
-        getDefaultVideoCaptureFile(defaultFile);
-        defaultFile.cloneTo(apFile);
-    }
+        i_getDefaultVideoCaptureFile(aVideoCaptureFile);
     else
-        mHWData->mVideoCaptureFile.cloneTo(apFile);
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureFile)(IN_BSTR aFile)
-{
-    Utf8Str strFile(aFile);
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        aVideoCaptureFile = mHWData->mVideoCaptureFile;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureFile(const com::Utf8Str &aVideoCaptureFile)
+{
+    Utf8Str strFile(aVideoCaptureFile);
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1833,10 +1643,10 @@
     {
         Utf8Str defaultFile;
-        getDefaultVideoCaptureFile(defaultFile);
+        i_getDefaultVideoCaptureFile(defaultFile);
         if (!RTPathCompare(strFile.c_str(), defaultFile.c_str()))
             strFile.setNull();
     }
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mVideoCaptureFile = strFile;
@@ -1845,19 +1655,13 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(VideoCaptureWidth)(ULONG *aHorzRes)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getVideoCaptureWidth(ULONG *aVideoCaptureWidth)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    *aHorzRes = mHWData->mVideoCaptureWidth;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureWidth)(ULONG aHorzRes)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aVideoCaptureWidth = mHWData->mVideoCaptureWidth;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureWidth(ULONG aVideoCaptureWidth)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1866,26 +1670,20 @@
         return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureWidth = aHorzRes;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(VideoCaptureHeight)(ULONG *aVertRes)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mVideoCaptureWidth = aVideoCaptureWidth;
+
+    return S_OK;
+}
+
+HRESULT Machine::getVideoCaptureHeight(ULONG *aVideoCaptureHeight)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-     *aVertRes = mHWData->mVideoCaptureHeight;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureHeight)(ULONG aVertRes)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aVideoCaptureHeight = mHWData->mVideoCaptureHeight;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureHeight(ULONG aVideoCaptureHeight)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1894,26 +1692,20 @@
         return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureHeight = aVertRes;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(VideoCaptureRate)(ULONG *aRate)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mVideoCaptureHeight = aVideoCaptureHeight;
+
+    return S_OK;
+}
+
+HRESULT Machine::getVideoCaptureRate(ULONG *aVideoCaptureRate)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-     *aRate = mHWData->mVideoCaptureRate;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureRate)(ULONG aRate)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aVideoCaptureRate = mHWData->mVideoCaptureRate;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureRate(ULONG aVideoCaptureRate)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1922,26 +1714,20 @@
         return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureRate = aRate;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(VideoCaptureFPS)(ULONG *aFPS)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mVideoCaptureRate = aVideoCaptureRate;
+
+    return S_OK;
+}
+
+HRESULT Machine::getVideoCaptureFPS(ULONG *aVideoCaptureFPS)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-     *aFPS = mHWData->mVideoCaptureFPS;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VideoCaptureFPS)(ULONG aFPS)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aVideoCaptureFPS = mHWData->mVideoCaptureFPS;
+    return S_OK;
+}
+
+HRESULT Machine::setVideoCaptureFPS(ULONG aVideoCaptureFPS)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1950,18 +1736,13 @@
         return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVideoCaptureFPS = aFPS;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(GraphicsControllerType)(GraphicsControllerType_T *aGraphicsControllerType)
-{
-    CheckComArgOutPointerValid(aGraphicsControllerType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mVideoCaptureFPS = aVideoCaptureFPS;
+
+    return S_OK;
+}
+
+HRESULT Machine::getGraphicsControllerType(GraphicsControllerType_T *aGraphicsControllerType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -1971,5 +1752,5 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(GraphicsControllerType)(GraphicsControllerType_T aGraphicsControllerType)
+HRESULT Machine::setGraphicsControllerType(GraphicsControllerType_T aGraphicsControllerType)
 {
     switch (aGraphicsControllerType)
@@ -1985,13 +1766,10 @@
     }
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mGraphicsControllerType = aGraphicsControllerType;
@@ -2000,38 +1778,30 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(VRAMSize)(ULONG *memorySize)
-{
-    CheckComArgOutPointerValid(memorySize);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getVRAMSize(ULONG *aVRAMSize)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *memorySize = mHWData->mVRAMSize;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(VRAMSize)(ULONG memorySize)
+    *aVRAMSize = mHWData->mVRAMSize;
+
+    return S_OK;
+}
+
+HRESULT Machine::setVRAMSize(ULONG aVRAMSize)
 {
     /* check VRAM limits */
-    if (memorySize < SchemaDefs::MinGuestVRAM ||
-        memorySize > SchemaDefs::MaxGuestVRAM)
+    if (aVRAMSize < SchemaDefs::MinGuestVRAM ||
+        aVRAMSize > SchemaDefs::MaxGuestVRAM)
         return setError(E_INVALIDARG,
                         tr("Invalid VRAM size: %lu MB (must be in range [%lu, %lu] MB)"),
-                        memorySize, SchemaDefs::MinGuestVRAM, SchemaDefs::MaxGuestVRAM);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aVRAMSize, SchemaDefs::MinGuestVRAM, SchemaDefs::MaxGuestVRAM);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mVRAMSize = memorySize;
+    mHWData->mVRAMSize = aVRAMSize;
 
     return S_OK;
@@ -2039,14 +1809,9 @@
 
 /** @todo this method should not be public */
-STDMETHODIMP Machine::COMGETTER(MemoryBalloonSize)(ULONG *memoryBalloonSize)
-{
-    CheckComArgOutPointerValid(memoryBalloonSize);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getMemoryBalloonSize(ULONG *aMemoryBalloonSize)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *memoryBalloonSize = mHWData->mMemoryBalloonSize;
+    *aMemoryBalloonSize = mHWData->mMemoryBalloonSize;
 
     return S_OK;
@@ -2059,210 +1824,164 @@
  * we have to make sure that we never call IGuest from here.
  */
-STDMETHODIMP Machine::COMSETTER(MemoryBalloonSize)(ULONG memoryBalloonSize)
+HRESULT Machine::setMemoryBalloonSize(ULONG aMemoryBalloonSize)
 {
     /* This must match GMMR0Init; currently we only support memory ballooning on all 64-bit hosts except Mac OS X */
 #if HC_ARCH_BITS == 64 && (defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD))
     /* check limits */
-    if (memoryBalloonSize >= VMMDEV_MAX_MEMORY_BALLOON(mHWData->mMemorySize))
+    if (aMemoryBalloonSize >= VMMDEV_MAX_MEMORY_BALLOON(mHWData->mMemorySize))
         return setError(E_INVALIDARG,
                         tr("Invalid memory balloon size: %lu MB (must be in range [%lu, %lu] MB)"),
-                        memoryBalloonSize, 0, VMMDEV_MAX_MEMORY_BALLOON(mHWData->mMemorySize));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aMemoryBalloonSize, 0, VMMDEV_MAX_MEMORY_BALLOON(mHWData->mMemorySize));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mMemoryBalloonSize = memoryBalloonSize;
+    mHWData->mMemoryBalloonSize = aMemoryBalloonSize;
 
     return S_OK;
 #else
-    NOREF(memoryBalloonSize);
+    NOREF(aMemoryBalloonSize);
     return setError(E_NOTIMPL, tr("Memory ballooning is only supported on 64-bit hosts"));
 #endif
 }
 
-STDMETHODIMP Machine::COMGETTER(PageFusionEnabled) (BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getPageFusionEnabled(BOOL *aPageFusionEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mPageFusionEnabled;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(PageFusionEnabled) (BOOL aEnabled)
+    *aPageFusionEnabled = mHWData->mPageFusionEnabled;
+    return S_OK;
+}
+
+HRESULT Machine::setPageFusionEnabled(BOOL aPageFusionEnabled)
 {
 #ifdef VBOX_WITH_PAGE_SHARING
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /** @todo must support changes for running vms and keep this in sync with IGuest. */
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mPageFusionEnabled = aEnabled;
+    mHWData->mPageFusionEnabled = aPageFusionEnabled;
     return S_OK;
 #else
-    NOREF(aEnabled);
+    NOREF(aPageFusionEnabled);
     return setError(E_NOTIMPL, tr("Page fusion is only supported on 64-bit hosts"));
 #endif
 }
 
-STDMETHODIMP Machine::COMGETTER(Accelerate3DEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getAccelerate3DEnabled(BOOL *aAccelerate3DEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mAccelerate3DEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(Accelerate3DEnabled)(BOOL enable)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aAccelerate3DEnabled = mHWData->mAccelerate3DEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAccelerate3DEnabled(BOOL aAccelerate3DEnabled)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     /** @todo check validity! */
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mAccelerate3DEnabled = enable;
-
-    return S_OK;
-}
-
-
-STDMETHODIMP Machine::COMGETTER(Accelerate2DVideoEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mAccelerate3DEnabled = aAccelerate3DEnabled;
+
+    return S_OK;
+}
+
+
+HRESULT Machine::getAccelerate2DVideoEnabled(BOOL *aAccelerate2DVideoEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mAccelerate2DVideoEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(Accelerate2DVideoEnabled)(BOOL enable)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aAccelerate2DVideoEnabled = mHWData->mAccelerate2DVideoEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAccelerate2DVideoEnabled(BOOL aAccelerate2DVideoEnabled)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     /** @todo check validity! */
-
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mAccelerate2DVideoEnabled = enable;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(MonitorCount)(ULONG *monitorCount)
-{
-    CheckComArgOutPointerValid(monitorCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mAccelerate2DVideoEnabled = aAccelerate2DVideoEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::getMonitorCount(ULONG *aMonitorCount)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *monitorCount = mHWData->mMonitorCount;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(MonitorCount)(ULONG monitorCount)
+    *aMonitorCount = mHWData->mMonitorCount;
+
+    return S_OK;
+}
+
+HRESULT Machine::setMonitorCount(ULONG aMonitorCount)
 {
     /* make sure monitor count is a sensible number */
-    if (monitorCount < 1 || monitorCount > SchemaDefs::MaxGuestMonitors)
+    if (aMonitorCount < 1 || aMonitorCount > SchemaDefs::MaxGuestMonitors)
         return setError(E_INVALIDARG,
                         tr("Invalid monitor count: %lu (must be in range [%lu, %lu])"),
-                        monitorCount, 1, SchemaDefs::MaxGuestMonitors);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aMonitorCount, 1, SchemaDefs::MaxGuestMonitors);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mMonitorCount = monitorCount;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(BIOSSettings)(IBIOSSettings **biosSettings)
-{
-    CheckComArgOutPointerValid(biosSettings);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mMonitorCount = aMonitorCount;
+
+    return S_OK;
+}
+
+HRESULT Machine::getBIOSSettings(ComPtr<IBIOSSettings> &aBIOSSettings)
+{
     /* mBIOSSettings is constant during life time, no need to lock */
-    mBIOSSettings.queryInterfaceTo(biosSettings);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetCPUProperty(CPUPropertyType_T property, BOOL *aVal)
-{
-    CheckComArgOutPointerValid(aVal);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mBIOSSettings.queryInterfaceTo(aBIOSSettings.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getCPUProperty(CPUPropertyType_T aProperty, BOOL *aValue)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    switch (property)
+    switch (aProperty)
     {
         case CPUPropertyType_PAE:
-            *aVal = mHWData->mPAEEnabled;
+            *aValue = mHWData->mPAEEnabled;
             break;
 
         case CPUPropertyType_Synthetic:
-            *aVal = mHWData->mSyntheticCpu;
+            *aValue = mHWData->mSyntheticCpu;
             break;
 
         case CPUPropertyType_LongMode:
             if (mHWData->mLongMode == settings::Hardware::LongMode_Enabled)
-                *aVal = TRUE;
+                *aValue = TRUE;
             else if (mHWData->mLongMode == settings::Hardware::LongMode_Disabled)
-                *aVal = FALSE;
+                *aValue = FALSE;
 #if HC_ARCH_BITS == 64
             else
-                *aVal = TRUE;
+                *aValue = TRUE;
 #else
             else
             {
-                *aVal = FALSE;
+                *aValue = FALSE;
 
                 ComPtr<IGuestOSType> ptrGuestOSType;
@@ -2274,10 +1993,10 @@
                     if (SUCCEEDED(hrc2) && fIs64Bit)
                     {
-                        ComObjPtr<Host> ptrHost = mParent->i_host();
+                        ComObjPtr<Host> ptrHost = mParent->host();
                         alock.release();
 
                         hrc2 = ptrHost->GetProcessorFeature(ProcessorFeature_LongMode, aVal); AssertComRC(hrc2);
                         if (FAILED(hrc2))
-                            *aVal = FALSE;
+                            *aValue = FALSE;
                     }
                 }
@@ -2287,5 +2006,5 @@
 
         case CPUPropertyType_TripleFaultReset:
-            *aVal = mHWData->mTripleFaultReset;
+            *aValue = mHWData->mTripleFaultReset;
             break;
 
@@ -2296,38 +2015,35 @@
 }
 
-STDMETHODIMP Machine::SetCPUProperty(CPUPropertyType_T property, BOOL aVal)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setCPUProperty(CPUPropertyType_T aProperty, BOOL aValue)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    switch (property)
+    switch (aProperty)
     {
         case CPUPropertyType_PAE:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mPAEEnabled = !!aVal;
+            mHWData->mPAEEnabled = !!aValue;
             break;
 
         case CPUPropertyType_Synthetic:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mSyntheticCpu = !!aVal;
+            mHWData->mSyntheticCpu = !!aValue;
             break;
 
         case CPUPropertyType_LongMode:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mLongMode = !aVal ? settings::Hardware::LongMode_Disabled : settings::Hardware::LongMode_Enabled;
+            mHWData->mLongMode = !aValue ? settings::Hardware::LongMode_Disabled : settings::Hardware::LongMode_Enabled;
             break;
 
         case CPUPropertyType_TripleFaultReset:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mTripleFaultReset = !!aVal;
+            mHWData->mTripleFaultReset = !!aValue;
             break;
 
@@ -2338,14 +2054,6 @@
 }
 
-STDMETHODIMP Machine::GetCPUIDLeaf(ULONG aId, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx)
-{
-    CheckComArgOutPointerValid(aValEax);
-    CheckComArgOutPointerValid(aValEbx);
-    CheckComArgOutPointerValid(aValEcx);
-    CheckComArgOutPointerValid(aValEdx);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getCPUIDLeaf(ULONG aId, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -2398,12 +2106,10 @@
 }
 
-STDMETHODIMP Machine::SetCPUIDLeaf(ULONG aId, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT Machine::setCPUIDLeaf(ULONG aId, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2423,5 +2129,5 @@
             AssertCompile(RT_ELEMENTS(mHWData->mCpuIdStdLeafs) == 0xB);
             AssertRelease(aId < RT_ELEMENTS(mHWData->mCpuIdStdLeafs));
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
             mHWData->mCpuIdStdLeafs[aId].ulId  = aId;
@@ -2445,5 +2151,5 @@
             AssertCompile(RT_ELEMENTS(mHWData->mCpuIdExtLeafs) == 0xB);
             AssertRelease(aId - 0x80000000 < RT_ELEMENTS(mHWData->mCpuIdExtLeafs));
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
             mHWData->mCpuIdExtLeafs[aId - 0x80000000].ulId  = aId;
@@ -2460,12 +2166,9 @@
 }
 
-STDMETHODIMP Machine::RemoveCPUIDLeaf(ULONG aId)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::removeCPUIDLeaf(ULONG aId)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2485,5 +2188,5 @@
             AssertCompile(RT_ELEMENTS(mHWData->mCpuIdStdLeafs) == 0xB);
             AssertRelease(aId < RT_ELEMENTS(mHWData->mCpuIdStdLeafs));
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
             /* Invalidate leaf. */
@@ -2504,5 +2207,5 @@
             AssertCompile(RT_ELEMENTS(mHWData->mCpuIdExtLeafs) == 0xB);
             AssertRelease(aId - 0x80000000 < RT_ELEMENTS(mHWData->mCpuIdExtLeafs));
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
             /* Invalidate leaf. */
@@ -2516,64 +2219,55 @@
 }
 
-STDMETHODIMP Machine::RemoveAllCPUIDLeaves()
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::removeAllCPUIDLeaves()
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
 
     /* Invalidate all standard leafs. */
-    for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mCpuIdStdLeafs); i++)
+    for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mCpuIdStdLeafs); ++i)
         mHWData->mCpuIdStdLeafs[i].ulId = UINT32_MAX;
 
     /* Invalidate all extended leafs. */
-    for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mCpuIdExtLeafs); i++)
+    for (unsigned i = 0; i < RT_ELEMENTS(mHWData->mCpuIdExtLeafs); ++i)
         mHWData->mCpuIdExtLeafs[i].ulId = UINT32_MAX;
 
     return S_OK;
 }
-
-STDMETHODIMP Machine::GetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL *aVal)
-{
-    CheckComArgOutPointerValid(aVal);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getHWVirtExProperty(HWVirtExPropertyType_T aProperty, BOOL *aValue)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    switch(property)
+    switch(aProperty)
     {
         case HWVirtExPropertyType_Enabled:
-            *aVal = mHWData->mHWVirtExEnabled;
+            *aValue = mHWData->mHWVirtExEnabled;
             break;
 
         case HWVirtExPropertyType_VPID:
-            *aVal = mHWData->mHWVirtExVPIDEnabled;
+            *aValue = mHWData->mHWVirtExVPIDEnabled;
             break;
 
         case HWVirtExPropertyType_NestedPaging:
-            *aVal = mHWData->mHWVirtExNestedPagingEnabled;
+            *aValue = mHWData->mHWVirtExNestedPagingEnabled;
             break;
 
         case HWVirtExPropertyType_UnrestrictedExecution:
-            *aVal = mHWData->mHWVirtExUXEnabled;
+            *aValue = mHWData->mHWVirtExUXEnabled;
             break;
 
         case HWVirtExPropertyType_LargePages:
-            *aVal = mHWData->mHWVirtExLargePagesEnabled;
+            *aValue = mHWData->mHWVirtExLargePagesEnabled;
 #if defined(DEBUG_bird) && defined(RT_OS_LINUX) /* This feature is deadly here */
-            *aVal = FALSE;
+            *aValue = FALSE;
 #endif
             break;
 
         case HWVirtExPropertyType_Force:
-            *aVal = mHWData->mHWVirtExForceEnabled;
+            *aValue = mHWData->mHWVirtExForceEnabled;
             break;
 
@@ -2584,50 +2278,47 @@
 }
 
-STDMETHODIMP Machine::SetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL aVal)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setHWVirtExProperty(HWVirtExPropertyType_T aProperty, BOOL aValue)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    switch(property)
+    switch(aProperty)
     {
         case HWVirtExPropertyType_Enabled:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExEnabled = !!aVal;
+            mHWData->mHWVirtExEnabled = !!aValue;
             break;
 
         case HWVirtExPropertyType_VPID:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExVPIDEnabled = !!aVal;
+            mHWData->mHWVirtExVPIDEnabled = !!aValue;
             break;
 
         case HWVirtExPropertyType_NestedPaging:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExNestedPagingEnabled = !!aVal;
+            mHWData->mHWVirtExNestedPagingEnabled = !!aValue;
             break;
 
         case HWVirtExPropertyType_UnrestrictedExecution:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExUXEnabled = !!aVal;
+            mHWData->mHWVirtExUXEnabled = !!aValue;
             break;
 
         case HWVirtExPropertyType_LargePages:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExLargePagesEnabled = !!aVal;
+            mHWData->mHWVirtExLargePagesEnabled = !!aValue;
             break;
 
         case HWVirtExPropertyType_Force:
-            setModified(IsModified_MachineData);
+            i_setModified(IsModified_MachineData);
             mHWData.backup();
-            mHWData->mHWVirtExForceEnabled = !!aVal;
+            mHWData->mHWVirtExForceEnabled = !!aValue;
             break;
 
@@ -2639,21 +2330,14 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(SnapshotFolder)(BSTR *aSnapshotFolder)
-{
-    CheckComArgOutPointerValid(aSnapshotFolder);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getSnapshotFolder(com::Utf8Str &aSnapshotFolder)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Utf8Str strFullSnapshotFolder;
-    calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
-    strFullSnapshotFolder.cloneTo(aSnapshotFolder);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(SnapshotFolder)(IN_BSTR aSnapshotFolder)
+    i_calculateFullPath(mUserData->s.strSnapshotFolder, aSnapshotFolder);
+
+    return S_OK;
+}
+
+HRESULT Machine::setSnapshotFolder(const com::Utf8Str &aSnapshotFolder)
 {
     /* @todo (r=dmik):
@@ -2665,10 +2349,7 @@
      */
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -2677,75 +2358,59 @@
                         tr("The snapshot folder of a machine with snapshots cannot be changed (please delete all snapshots first)"));
 
-    Utf8Str strSnapshotFolder0(aSnapshotFolder);       // keep original
-
-    Utf8Str strSnapshotFolder(strSnapshotFolder0);
+    Utf8Str strSnapshotFolder(aSnapshotFolder);       // keep original
+
     if (strSnapshotFolder.isEmpty())
         strSnapshotFolder = "Snapshots";
-    int vrc = calculateFullPath(strSnapshotFolder,
+    int vrc = i_calculateFullPath(strSnapshotFolder,
                                 strSnapshotFolder);
     if (RT_FAILURE(vrc))
         return setError(E_FAIL,
-                        tr("Invalid snapshot folder '%ls' (%Rrc)"),
-                        aSnapshotFolder, vrc);
-
-    setModified(IsModified_MachineData);
+                        tr("Invalid snapshot folder '%s' (%Rrc)"),
+                        strSnapshotFolder.c_str(), vrc);
+
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
 
-    copyPathRelativeToMachine(strSnapshotFolder, mUserData->s.strSnapshotFolder);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(MediumAttachments)(ComSafeArrayOut(IMediumAttachment*, aAttachments))
-{
-    CheckComArgOutSafeArrayPointerValid(aAttachments);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    i_copyPathRelativeToMachine(strSnapshotFolder, mUserData->s.strSnapshotFolder);
+
+    return S_OK;
+}
+
+HRESULT Machine::getMediumAttachments(std::vector<ComPtr<IMediumAttachment> > &aMediumAttachments)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    SafeIfaceArray<IMediumAttachment> attachments(mMediaData->mAttachments);
-    attachments.detachTo(ComSafeArrayOutArg(aAttachments));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(VRDEServer)(IVRDEServer **vrdeServer)
-{
-    CheckComArgOutPointerValid(vrdeServer);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aMediumAttachments.resize(mMediaData->mAttachments.size());
+    size_t i = 0;
+    for (MediaData::AttachmentList::iterator it = mMediaData->mAttachments.begin();
+         it != mMediaData->mAttachments.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aMediumAttachments[i].asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getVRDEServer(ComPtr<IVRDEServer> &aVRDEServer)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     Assert(!!mVRDEServer);
-    mVRDEServer.queryInterfaceTo(vrdeServer);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(AudioAdapter)(IAudioAdapter **audioAdapter)
-{
-    CheckComArgOutPointerValid(audioAdapter);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+    mVRDEServer.queryInterfaceTo(aVRDEServer.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getAudioAdapter(ComPtr<IAudioAdapter> &aAudioAdapter)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mAudioAdapter.queryInterfaceTo(audioAdapter);
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(USBControllers)(ComSafeArrayOut(IUSBController *, aUSBControllers))
+    mAudioAdapter.queryInterfaceTo(aAudioAdapter.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getUSBControllers(std::vector<ComPtr<IUSBController> > &aUSBControllers)
 {
 #ifdef VBOX_WITH_VUSB
-    CheckComArgOutPointerValid(aUSBControllers);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     clearError();
     MultiResult rc(S_OK);
@@ -2758,6 +2423,10 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    SafeIfaceArray<IUSBController> ctrls(*mUSBControllers.data());
-    ctrls.detachTo(ComSafeArrayOutArg(aUSBControllers));
+    USBControllerList data = *mUSBControllers.data();
+    aUSBControllers.resize(data.size());
+    size_t i = 0;
+    for (USBControllerList::iterator it = data.begin(); it != data.end(); ++i, ++it)
+        (*it).queryInterfaceTo(aUSBControllers[i].asOutParam());
+
     return S_OK;
 #else
@@ -2770,12 +2439,7 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(USBDeviceFilters)(IUSBDeviceFilters **aUSBDeviceFilters)
+HRESULT Machine::getUSBDeviceFilters(ComPtr<IUSBDeviceFilters> &aUSBDeviceFilters)
 {
 #ifdef VBOX_WITH_VUSB
-    CheckComArgOutPointerValid(aUSBDeviceFilters);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     clearError();
     MultiResult rc(S_OK);
@@ -2788,5 +2452,5 @@
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    return rc = mUSBDeviceFilters.queryInterfaceTo(aUSBDeviceFilters);
+    return rc = mUSBDeviceFilters.queryInterfaceTo(aUSBDeviceFilters.asOutParam());
 #else
     /* Note: The GUI depends on this method returning E_NOTIMPL with no
@@ -2798,44 +2462,31 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(SettingsFilePath)(BSTR *aFilePath)
-{
-    CheckComArgOutPointerValid(aFilePath);
-
-    AutoLimitedCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getSettingsFilePath(com::Utf8Str &aSettingsFilePath)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->m_strConfigFileFull.cloneTo(aFilePath);
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(SettingsModified)(BOOL *aModified)
-{
-    CheckComArgOutPointerValid(aModified);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aSettingsFilePath = mData->m_strConfigFileFull;
+
+    return S_OK;
+}
+
+HRESULT Machine::getSettingsModified(BOOL *aSettingsModified)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     if (!mData->pMachineConfigFile->fileExists())
         // this is a new machine, and no config file exists yet:
-        *aModified = TRUE;
+        *aSettingsModified = TRUE;
     else
-        *aModified = (mData->flModifications != 0);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(SessionState)(SessionState_T *aSessionState)
-{
-    CheckComArgOutPointerValid(aSessionState);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+        *aSettingsModified = (mData->flModifications != 0);
+
+    return S_OK;
+}
+
+HRESULT Machine::getSessionState(SessionState_T *aSessionState)
+{
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -2846,25 +2497,15 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(SessionType)(BSTR *aSessionType)
-{
-    CheckComArgOutPointerValid(aSessionType);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getSessionType(com::Utf8Str &aSessionType)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mSession.mType.cloneTo(aSessionType);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(SessionPID)(ULONG *aSessionPID)
-{
-    CheckComArgOutPointerValid(aSessionPID);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aSessionType = mData->mSession.mType;
+
+    return S_OK;
+}
+
+HRESULT Machine::getSessionPID(ULONG *aSessionPID)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -2874,25 +2515,15 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(State)(MachineState_T *machineState)
-{
-    CheckComArgOutPointerValid(machineState);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getState(MachineState_T *aState)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *machineState = mData->mMachineState;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(LastStateChange)(LONG64 *aLastStateChange)
-{
-    CheckComArgOutPointerValid(aLastStateChange);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aState = mData->mMachineState;
+
+    return S_OK;
+}
+
+HRESULT Machine::getLastStateChange(LONG64 *aLastStateChange)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -2902,55 +2533,33 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(StateFilePath)(BSTR *aStateFilePath)
-{
-    CheckComArgOutPointerValid(aStateFilePath);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getStateFilePath(com::Utf8Str &aStateFilePath)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mSSData->strStateFilePath.cloneTo(aStateFilePath);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(LogFolder)(BSTR *aLogFolder)
-{
-    CheckComArgOutPointerValid(aLogFolder);
-
-    AutoCaller autoCaller(this);
-    AssertComRCReturnRC(autoCaller.rc());
-
+    aStateFilePath = mSSData->strStateFilePath;
+
+    return S_OK;
+}
+
+HRESULT Machine::getLogFolder(com::Utf8Str &aLogFolder)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Utf8Str logFolder;
-    getLogFolder(logFolder);
-    logFolder.cloneTo(aLogFolder);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(CurrentSnapshot) (ISnapshot **aCurrentSnapshot)
-{
-    CheckComArgOutPointerValid(aCurrentSnapshot);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    i_getLogFolder(aLogFolder);
+
+    return S_OK;
+}
+
+HRESULT Machine::getCurrentSnapshot(ComPtr<ISnapshot> &aCurrentSnapshot)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mData->mCurrentSnapshot.queryInterfaceTo(aCurrentSnapshot);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(SnapshotCount)(ULONG *aSnapshotCount)
-{
-    CheckComArgOutPointerValid(aSnapshotCount);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mData->mCurrentSnapshot.queryInterfaceTo(aCurrentSnapshot.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getSnapshotCount(ULONG *aSnapshotCount)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -2962,11 +2571,6 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(CurrentStateModified)(BOOL *aCurrentStateModified)
-{
-    CheckComArgOutPointerValid(aCurrentStateModified);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getCurrentStateModified(BOOL *aCurrentStateModified)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -2982,26 +2586,19 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders))
-{
-    CheckComArgOutSafeArrayPointerValid(aSharedFolders);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getSharedFolders(std::vector<ComPtr<ISharedFolder> > &aSharedFolders)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    SafeIfaceArray<ISharedFolder> folders(mHWData->mSharedFolders);
-    folders.detachTo(ComSafeArrayOutArg(aSharedFolders));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(ClipboardMode)(ClipboardMode_T *aClipboardMode)
-{
-    CheckComArgOutPointerValid(aClipboardMode);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aSharedFolders.resize(mHWData->mSharedFolders.size());
+    size_t i = 0;
+    for (std::list<ComObjPtr<SharedFolder> >::iterator it = mHWData->mSharedFolders.begin();
+         it != mHWData->mSharedFolders.end(); ++i, ++it)
+        (*it).queryInterfaceTo(aSharedFolders[i].asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getClipboardMode(ClipboardMode_T *aClipboardMode)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -3011,19 +2608,16 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(ClipboardMode)(ClipboardMode_T aClipboardMode)
+HRESULT Machine::setClipboardMode(ClipboardMode_T aClipboardMode)
 {
     HRESULT rc = S_OK;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     alock.release();
-    rc = onClipboardModeChange(aClipboardMode);
+    rc = i_onClipboardModeChange(aClipboardMode);
     alock.acquire();
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mClipboardMode = aClipboardMode;
@@ -3031,16 +2625,11 @@
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(DnDMode)(DnDMode_T *aDnDMode)
-{
-    CheckComArgOutPointerValid(aDnDMode);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        i_saveSettings(NULL);
+
+    return S_OK;
+}
+
+HRESULT Machine::getDnDMode(DnDMode_T *aDnDMode)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -3050,19 +2639,17 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(DnDMode)(DnDMode_T aDnDMode)
+HRESULT Machine::setDnDMode(DnDMode_T aDnDMode)
 {
     HRESULT rc = S_OK;
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     alock.release();
-    rc = onDnDModeChange(aDnDMode);
+    rc = i_onDnDModeChange(aDnDMode);
+
     alock.acquire();
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mDnDMode = aDnDMode;
@@ -3070,21 +2657,16 @@
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(GuestPropertyNotificationPatterns)(BSTR *aPatterns)
-{
-    CheckComArgOutPointerValid(aPatterns);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+        i_saveSettings(NULL);
+
+    return S_OK;
+}
+
+HRESULT Machine::getGuestPropertyNotificationPatterns(com::Utf8Str &aGuestPropertyNotificationPatterns)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     try
     {
-        mHWData->mGuestPropertyNotificationPatterns.cloneTo(aPatterns);
+        aGuestPropertyNotificationPatterns = mHWData->mGuestPropertyNotificationPatterns;
     }
     catch (...)
@@ -3096,42 +2678,30 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(GuestPropertyNotificationPatterns)(IN_BSTR aPatterns)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setGuestPropertyNotificationPatterns(const com::Utf8Str &aGuestPropertyNotificationPatterns)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mGuestPropertyNotificationPatterns = aPatterns;
+    mHWData->mGuestPropertyNotificationPatterns = aGuestPropertyNotificationPatterns;
     return rc;
 }
 
-STDMETHODIMP Machine::COMGETTER(StorageControllers)(ComSafeArrayOut(IStorageController *, aStorageControllers))
-{
-    CheckComArgOutSafeArrayPointerValid(aStorageControllers);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getStorageControllers(std::vector<ComPtr<IStorageController> > &aStorageControllers)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    SafeIfaceArray<IStorageController> ctrls(*mStorageControllers.data());
-    ctrls.detachTo(ComSafeArrayOutArg(aStorageControllers));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(TeleporterEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    StorageControllerList data = *mStorageControllers.data();
+    size_t i = 0;
+    aStorageControllers.resize(data.size());
+    for (StorageControllerList::iterator it = data.begin(); it != data.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aStorageControllers[i].asOutParam());
+    return S_OK;
+}
+
+HRESULT Machine::getTeleporterEnabled(BOOL *aEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -3141,16 +2711,13 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(TeleporterEnabled)(BOOL aEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setTeleporterEnabled(BOOL aTeleporterEnabled)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* Only allow it to be set to true when PoweredOff or Aborted.
        (Clearing it is always permitted.) */
-    if (    aEnabled
+    if (    aTeleporterEnabled
         &&  mData->mRegistered
-        &&  (   !isSessionMachine()
+        &&  (   !i_isSessionMachine()
              || (   mData->mMachineState != MachineState_PoweredOff
                  && mData->mMachineState != MachineState_Teleported
@@ -3163,102 +2730,80 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.fTeleporterEnabled = !!aEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(TeleporterPort)(ULONG *aPort)
-{
-    CheckComArgOutPointerValid(aPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.fTeleporterEnabled = !! aTeleporterEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::getTeleporterPort(ULONG *aTeleporterPort)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aPort = (ULONG)mUserData->s.uTeleporterPort;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(TeleporterPort)(ULONG aPort)
-{
-    if (aPort >= _64K)
-        return setError(E_INVALIDARG, tr("Invalid port number %d"), aPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    *aTeleporterPort = (ULONG)mUserData->s.uTeleporterPort;
+
+    return S_OK;
+}
+
+HRESULT Machine::setTeleporterPort(ULONG aTeleporterPort)
+{
+    if (aTeleporterPort >= _64K)
+        return setError(E_INVALIDARG, tr("Invalid port number %d"), aTeleporterPort);
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.uTeleporterPort = (uint32_t)aPort;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(TeleporterAddress)(BSTR *aAddress)
-{
-    CheckComArgOutPointerValid(aAddress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.uTeleporterPort = (uint32_t)aTeleporterPort;
+
+    return S_OK;
+}
+
+HRESULT Machine::getTeleporterAddress(com::Utf8Str &aTeleporterAddress)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strTeleporterAddress.cloneTo(aAddress);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(TeleporterAddress)(IN_BSTR aAddress)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aTeleporterAddress = mUserData->s.strTeleporterAddress;
+
+    return S_OK;
+}
+
+HRESULT Machine::setTeleporterAddress(const com::Utf8Str &aTeleporterAddress)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.strTeleporterAddress = aAddress;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(TeleporterPassword)(BSTR *aPassword)
-{
-    CheckComArgOutPointerValid(aPassword);
-
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        mUserData->s.strTeleporterPassword.cloneTo(aPassword);
-    }
-
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(TeleporterPassword)(IN_BSTR aPassword)
+    mUserData->s.strTeleporterAddress = aTeleporterAddress;
+
+    return S_OK;
+}
+
+HRESULT Machine::getTeleporterPassword(com::Utf8Str &aTeleporterPassword)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aTeleporterPassword =  mUserData->s.strTeleporterPassword;
+
+    return S_OK;
+}
+
+HRESULT Machine::setTeleporterPassword(const com::Utf8Str &aTeleporterPassword)
 {
     /*
      * Hash the password first.
      */
-    Utf8Str strPassword(aPassword);
-    if (!strPassword.isEmpty())
-    {
-        if (VBoxIsPasswordHashed(&strPassword))
+    com::Utf8Str aT = aTeleporterPassword;
+
+    if (!aT.isEmpty())
+    {
+        if (VBoxIsPasswordHashed(&aT))
             return setError(E_INVALIDARG, tr("Cannot set an already hashed password, only plain text password please"));
-        VBoxHashPassword(&strPassword);
+        VBoxHashPassword(&aT);
     }
 
@@ -3266,16 +2811,11 @@
      * Do the update.
      */
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
-        if (SUCCEEDED(hrc))
-        {
-            setModified(IsModified_MachineData);
-            mUserData.backup();
-            mUserData->s.strTeleporterPassword = strPassword;
-        }
+        i_setModified(IsModified_MachineData);
+        mUserData.backup();
+        mUserData->s.strTeleporterPassword = aT;
     }
 
@@ -3283,182 +2823,134 @@
 }
 
-STDMETHODIMP Machine::COMGETTER(FaultToleranceState)(FaultToleranceState_T *aState)
-{
-    CheckComArgOutPointerValid(aState);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getFaultToleranceState(FaultToleranceState_T *aFaultToleranceState)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aState = mUserData->s.enmFaultToleranceState;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(FaultToleranceState)(FaultToleranceState_T aState)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aFaultToleranceState = mUserData->s.enmFaultToleranceState;
+    return S_OK;
+}
+
+HRESULT Machine::setFaultToleranceState(FaultToleranceState_T aFaultToleranceState)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* @todo deal with running state change. */
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.enmFaultToleranceState = aState;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(FaultToleranceAddress)(BSTR *aAddress)
-{
-    CheckComArgOutPointerValid(aAddress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.enmFaultToleranceState = aFaultToleranceState;
+    return S_OK;
+}
+
+HRESULT Machine::getFaultToleranceAddress(com::Utf8Str &aFaultToleranceAddress)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strFaultToleranceAddress.cloneTo(aAddress);
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(FaultToleranceAddress)(IN_BSTR aAddress)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aFaultToleranceAddress = mUserData->s.strFaultToleranceAddress;
+    return S_OK;
+}
+
+HRESULT Machine::setFaultToleranceAddress(const com::Utf8Str &aFaultToleranceAddress)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* @todo deal with running state change. */
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.strFaultToleranceAddress = aAddress;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(FaultTolerancePort)(ULONG *aPort)
-{
-    CheckComArgOutPointerValid(aPort);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.strFaultToleranceAddress = aFaultToleranceAddress;
+    return S_OK;
+}
+
+HRESULT Machine::getFaultTolerancePort(ULONG *aFaultTolerancePort)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aPort = mUserData->s.uFaultTolerancePort;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(FaultTolerancePort)(ULONG aPort)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aFaultTolerancePort = mUserData->s.uFaultTolerancePort;
+    return S_OK;
+}
+
+HRESULT Machine::setFaultTolerancePort(ULONG aFaultTolerancePort)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* @todo deal with running state change. */
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.uFaultTolerancePort = aPort;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(FaultTolerancePassword)(BSTR *aPassword)
-{
-    CheckComArgOutPointerValid(aPassword);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.uFaultTolerancePort = aFaultTolerancePort;
+    return S_OK;
+}
+
+HRESULT Machine::getFaultTolerancePassword(com::Utf8Str &aFaultTolerancePassword)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mUserData->s.strFaultTolerancePassword.cloneTo(aPassword);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(FaultTolerancePassword)(IN_BSTR aPassword)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    aFaultTolerancePassword = mUserData->s.strFaultTolerancePassword;
+
+    return S_OK;
+}
+
+HRESULT Machine::setFaultTolerancePassword(const com::Utf8Str &aFaultTolerancePassword)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* @todo deal with running state change. */
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.strFaultTolerancePassword = aPassword;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(FaultToleranceSyncInterval)(ULONG *aInterval)
-{
-    CheckComArgOutPointerValid(aInterval);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.strFaultTolerancePassword = aFaultTolerancePassword;
+
+    return S_OK;
+}
+
+HRESULT Machine::getFaultToleranceSyncInterval(ULONG *aFaultToleranceSyncInterval)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aInterval = mUserData->s.uFaultToleranceInterval;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(FaultToleranceSyncInterval)(ULONG aInterval)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aFaultToleranceSyncInterval = mUserData->s.uFaultToleranceInterval;
+    return S_OK;
+}
+
+HRESULT Machine::setFaultToleranceSyncInterval(ULONG aFaultToleranceSyncInterval)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* @todo deal with running state change. */
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.uFaultToleranceInterval = aInterval;
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(RTCUseUTC)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.uFaultToleranceInterval = aFaultToleranceSyncInterval;
+    return S_OK;
+}
+
+HRESULT Machine::getRTCUseUTC(BOOL *aRTCUseUTC)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mUserData->s.fRTCUseUTC;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(RTCUseUTC)(BOOL aEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aRTCUseUTC = mUserData->s.fRTCUseUTC;
+
+    return S_OK;
+}
+
+HRESULT Machine::setRTCUseUTC(BOOL aRTCUseUTC)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     /* Only allow it to be set to true when PoweredOff or Aborted.
        (Clearing it is always permitted.) */
-    if (    aEnabled
+    if (    aRTCUseUTC
         &&  mData->mRegistered
-        &&  (   !isSessionMachine()
+        &&  (   !i_isSessionMachine()
              || (   mData->mMachineState != MachineState_PoweredOff
                  && mData->mMachineState != MachineState_Teleported
@@ -3471,49 +2963,36 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mUserData.backup();
-    mUserData->s.fRTCUseUTC = !!aEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(IOCacheEnabled)(BOOL *aEnabled)
-{
-    CheckComArgOutPointerValid(aEnabled);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mUserData->s.fRTCUseUTC = !!aRTCUseUTC;
+
+    return S_OK;
+}
+
+HRESULT Machine::getIOCacheEnabled(BOOL *aIOCacheEnabled)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aEnabled = mHWData->mIOCacheEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMSETTER(IOCacheEnabled)(BOOL aEnabled)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    *aIOCacheEnabled = mHWData->mIOCacheEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setIOCacheEnabled(BOOL aIOCacheEnabled)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
-    mHWData->mIOCacheEnabled = aEnabled;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(IOCacheSize)(ULONG *aIOCacheSize)
-{
-    CheckComArgOutPointerValid(aIOCacheSize);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mHWData->mIOCacheEnabled = aIOCacheEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::getIOCacheSize(ULONG *aIOCacheSize)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -3523,15 +3002,12 @@
 }
 
-STDMETHODIMP Machine::COMSETTER(IOCacheSize)(ULONG  aIOCacheSize)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setIOCacheSize(ULONG aIOCacheSize)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mIOCacheSize = aIOCacheSize;
@@ -3544,12 +3020,8 @@
  *  @note Locks objects!
  */
-STDMETHODIMP Machine::LockMachine(ISession *aSession,
-                                  LockType_T lockType)
-{
-    CheckComArgNotNull(aSession);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::lockMachine(const ComPtr<ISession> &aSession,
+                             LockType_T aLockType)
+
+{
     /* check the session state */
     SessionState_T state;
@@ -3590,6 +3062,8 @@
 
     // try again now
-    if (    (mData->mSession.mState == SessionState_Locked)         // machine is write-locked already (i.e. session machine exists)
-         && (lockType == LockType_Shared)                           // caller wants a shared link to the existing session that holds the write lock:
+    if (    (mData->mSession.mState == SessionState_Locked)         // machine is write-locked already
+                                                                    // (i.e. session machine exists)
+         && (aLockType == LockType_Shared)                          // caller wants a shared link to the
+                                                                    // existing session that holds the write lock:
        )
     {
@@ -3724,9 +3198,9 @@
             /* Get the client token ID to be passed to the client process */
             Utf8Str strTokenId;
-            sessionMachine->getTokenId(strTokenId);
+            sessionMachine->i_getTokenId(strTokenId);
             Assert(!strTokenId.isEmpty());
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
             /* Get the client token to be passed to the client process */
-            ComPtr<IToken> pToken(sessionMachine->getToken());
+            ComPtr<IToken> pToken(sessionMachine->i_getToken());
             /* The token is now "owned" by pToken, fix refcount */
             if (!pToken.isNull())
@@ -3748,7 +3222,7 @@
             LogFlowThisFunc(("Calling AssignMachine()...\n"));
 #ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
-            rc = pSessionControl->AssignMachine(sessionMachine, lockType, Bstr(strTokenId).raw());
+            rc = pSessionControl->AssignMachine(sessionMachine, aLockType, Bstr(strTokenId).raw());
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
-            rc = pSessionControl->AssignMachine(sessionMachine, lockType, pToken);
+            rc = pSessionControl->AssignMachine(sessionMachine, aLockType, pToken);
             /* Now the token is owned by the client process. */
             pToken.setNull();
@@ -3875,5 +3349,5 @@
         if (oldState != SessionState_Locked)
             /* fire an event */
-            mParent->i_onSessionStateChange(getId(), SessionState_Locked);
+            mParent->i_onSessionStateChange(i_getId(), SessionState_Locked);
     }
 
@@ -3884,11 +3358,10 @@
  *  @note Locks objects!
  */
-STDMETHODIMP Machine::LaunchVMProcess(ISession *aSession,
-                                      IN_BSTR aFrontend,
-                                      IN_BSTR aEnvironment,
-                                      IProgress **aProgress)
-{
-    CheckComArgStr(aFrontend);
-    Utf8Str strFrontend(aFrontend);
+HRESULT Machine::launchVMProcess(const ComPtr<ISession> &aSession,
+                                 const com::Utf8Str &aType,
+                                 const com::Utf8Str &aEnvironment,
+                                 ComPtr<IProgress> &aProgress)
+{
+    Utf8Str strFrontend(aType);
     Utf8Str strEnvironment(aEnvironment);
     /* "emergencystop" doesn't need the session, so skip the checks/interface
@@ -3898,8 +3371,4 @@
     if (strFrontend != "emergencystop")
         CheckComArgNotNull(aSession);
-    CheckComArgOutPointerValid(aProgress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     HRESULT rc = S_OK;
@@ -3962,5 +3431,6 @@
                             TRUE /* aCancelable */,
                             fTeleporterEnabled ? 20 : 10 /* uTotalOperationsWeight */,
-                            BstrFmt(tr("Creating process for virtual machine \"%s\" (%s)"), mUserData->s.strName.c_str(), strFrontend.c_str()).raw(),
+                            BstrFmt(tr("Creating process for virtual machine \"%s\" (%s)"),
+                            mUserData->s.strName.c_str(), strFrontend.c_str()).raw(),
                             2 /* uFirstOperationWeight */,
                             fTeleporterEnabled ? 3 : 1 /* cOtherProgressObjectOperations */);
@@ -3968,8 +3438,8 @@
         if (SUCCEEDED(rc))
         {
-            rc = launchVMProcess(control, strFrontend, strEnvironment, progress);
+            rc = i_launchVMProcess(control, strFrontend, strEnvironment, progress);
             if (SUCCEEDED(rc))
             {
-                progress.queryInterfaceTo(aProgress);
+                progress.queryInterfaceTo(aProgress.asOutParam());
 
                 /* signal the client watcher thread */
@@ -3977,5 +3447,5 @@
 
                 /* fire an event */
-                mParent->i_onSessionStateChange(getId(), SessionState_Spawning);
+                mParent->i_onSessionStateChange(i_getId(), SessionState_Spawning);
             }
         }
@@ -3984,5 +3454,5 @@
     {
         /* no progress object - either instant success or failure */
-        *aProgress = NULL;
+        aProgress = NULL;
 
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -4012,5 +3482,5 @@
 }
 
-STDMETHODIMP Machine::SetBootOrder(ULONG aPosition, DeviceType_T aDevice)
+HRESULT Machine::setBootOrder(ULONG aPosition, DeviceType_T aDevice)
 {
     if (aPosition < 1 || aPosition > SchemaDefs::MaxBootPosition)
@@ -4023,13 +3493,10 @@
                         tr("Booting from USB device is currently not supported"));
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mBootOrder[aPosition - 1] = aDevice;
@@ -4038,5 +3505,5 @@
 }
 
-STDMETHODIMP Machine::GetBootOrder(ULONG aPosition, DeviceType_T *aDevice)
+HRESULT Machine::getBootOrder(ULONG aPosition, DeviceType_T *aDevice)
 {
     if (aPosition < 1 || aPosition > SchemaDefs::MaxBootPosition)
@@ -4045,7 +3512,4 @@
                        aPosition, SchemaDefs::MaxBootPosition);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -4055,17 +3519,13 @@
 }
 
-STDMETHODIMP Machine::AttachDevice(IN_BSTR aControllerName,
-                                   LONG aControllerPort,
-                                   LONG aDevice,
-                                   DeviceType_T aType,
-                                   IMedium *aMedium)
-{
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aType=%d aMedium=%p\n",
-                     aControllerName, aControllerPort, aDevice, aType, aMedium));
-
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::attachDevice(const com::Utf8Str &aName,
+                              LONG aControllerPort,
+                              LONG aDevice,
+                              DeviceType_T aType,
+                              const ComPtr<IMedium> &aMedium)
+{
+    IMedium *aM = aMedium;
+    LogFlowThisFunc(("aControllerName=\"%s\" aControllerPort=%d aDevice=%d aType=%d aMedium=%p\n",
+                     aName.c_str(), aControllerPort, aDevice, aType, aM));
 
     // request the host lock first, since might be calling Host methods for getting host drives;
@@ -4074,5 +3534,5 @@
     AutoWriteLock treeLock(&mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4086,5 +3546,5 @@
     /* Check for an existing controller. */
     ComObjPtr<StorageController> ctl;
-    rc = getStorageControllerByName(aControllerName, ctl, true /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctl, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
@@ -4093,6 +3553,6 @@
     if (FAILED(rc))
         return setError(E_FAIL,
-                        tr("Could not get type of controller '%ls'"),
-                        aControllerName);
+                        tr("Could not get type of controller '%s'"),
+                        aName.c_str());
 
     bool fSilent = false;
@@ -4100,5 +3560,5 @@
 
     /* Check whether the flag to allow silent storage attachment reconfiguration is set. */
-    strReconfig = getExtraData(Utf8Str("VBoxInternal2/SilentReconfigureWhilePaused"));
+    strReconfig = i_getExtraData(Utf8Str("VBoxInternal2/SilentReconfigureWhilePaused"));
     if (   mData->mMachineState == MachineState_Paused
         && strReconfig == "1")
@@ -4110,8 +3570,8 @@
         fHotplug = true;
 
-    if (fHotplug && !isControllerHotplugCapable(ctrlType))
+    if (fHotplug && !i_isControllerHotplugCapable(ctrlType))
         return setError(VBOX_E_INVALID_VM_STATE,
-                        tr("Controller '%ls' does not support hotplugging"),
-                        aControllerName);
+                        tr("Controller '%s' does not support hotplugging"),
+                        aName.c_str());
 
     // check that the port and device are not out of range
@@ -4121,8 +3581,8 @@
     /* check if the device slot is already busy */
     MediumAttachment *pAttachTemp;
-    if ((pAttachTemp = findAttachment(mMediaData->mAttachments,
-                                      aControllerName,
-                                      aControllerPort,
-                                      aDevice)))
+    if ((pAttachTemp = i_findAttachment(mMediaData->mAttachments,
+                                        Bstr(aName).raw(),
+                                        aControllerPort,
+                                        aDevice)))
     {
         Medium *pMedium = pAttachTemp->i_getMedium();
@@ -4131,17 +3591,17 @@
             AutoReadLock mediumLock(pMedium COMMA_LOCKVAL_SRC_POS);
             return setError(VBOX_E_OBJECT_IN_USE,
-                            tr("Medium '%s' is already attached to port %d, device %d of controller '%ls' of this virtual machine"),
+                            tr("Medium '%s' is already attached to port %d, device %d of controller '%s' of this virtual machine"),
                             pMedium->i_getLocationFull().c_str(),
                             aControllerPort,
                             aDevice,
-                            aControllerName);
+                            aName.c_str());
         }
         else
             return setError(VBOX_E_OBJECT_IN_USE,
-                            tr("Device is already attached to port %d, device %d of controller '%ls' of this virtual machine"),
-                            aControllerPort, aDevice, aControllerName);
-    }
-
-    ComObjPtr<Medium> medium = static_cast<Medium*>(aMedium);
+                            tr("Device is already attached to port %d, device %d of controller '%s' of this virtual machine"),
+                            aControllerPort, aDevice, aName.c_str());
+    }
+
+    ComObjPtr<Medium> medium = static_cast<Medium*>(aM);
     if (aMedium && medium.isNull())
         return setError(E_INVALIDARG, "The given medium pointer is invalid");
@@ -4152,5 +3612,5 @@
     AutoWriteLock mediumLock(medium COMMA_LOCKVAL_SRC_POS);
 
-    if (    (pAttachTemp = findAttachment(mMediaData->mAttachments, medium))
+    if (    (pAttachTemp = i_findAttachment(mMediaData->mAttachments, medium))
          && !medium.isNull()
        )
@@ -4204,10 +3664,10 @@
              * changing attachments in which case the attachment just needs to
              * be restored */
-            if ((pAttachTemp = findAttachment(oldAtts, medium)))
+            if ((pAttachTemp = i_findAttachment(oldAtts, medium)))
             {
                 AssertReturn(!fIndirect, E_FAIL);
 
                 /* see if it's the same bus/channel/device */
-                if (pAttachTemp->i_matches(aControllerName, aControllerPort, aDevice))
+                if (pAttachTemp->i_matches(Bstr(aName).raw(), aControllerPort, aDevice))
                 {
                     /* the simplest case: restore the whole attachment
@@ -4243,5 +3703,5 @@
                         if (SUCCEEDED(rc))
                         {
-                            rc = onStorageDeviceChange(pAttachTemp, FALSE /* aRemove */, fSilent);
+                            rc = i_onStorageDeviceChange(pAttachTemp, FALSE /* aRemove */, fSilent);
                             /* Remove lock list in case of error. */
                             if (FAILED(rc))
@@ -4284,7 +3744,5 @@
                 uint32_t foundLevel = 0;
 
-                for (MediaData::AttachmentList::const_iterator it = oldAtts.begin();
-                     it != oldAtts.end();
-                     ++it)
+                for (MediaData::AttachmentList::const_iterator it = oldAtts.begin(); it != oldAtts.end(); ++it)
                 {
                     uint32_t level = 0;
@@ -4299,6 +3757,6 @@
                         /* skip the hard disk if its currently attached (we
                          * cannot attach the same hard disk twice) */
-                        if (findAttachment(mMediaData->mAttachments,
-                                           pMedium))
+                        if (i_findAttachment(mMediaData->mAttachments,
+                                             pMedium))
                             continue;
 
@@ -4308,5 +3766,5 @@
                          * descendant of medium will be used
                          */
-                        if (pAttach->i_matches(aControllerName, aControllerPort, aDevice))
+                        if (pAttach->i_matches(Bstr(aName).raw(), aControllerPort, aDevice))
                         {
                             /* the simplest case: restore the whole attachment
@@ -4342,5 +3800,5 @@
                                 if (SUCCEEDED(rc))
                                 {
-                                    rc = onStorageDeviceChange(pAttachTemp, FALSE /* aRemove */, fSilent);
+                                    rc = i_onStorageDeviceChange(pAttachTemp, FALSE /* aRemove */, fSilent);
                                     /* Remove lock list in case of error. */
                                     if (FAILED(rc))
@@ -4399,7 +3857,5 @@
                 uint32_t foundLevel = 0;
 
-                for (MediaData::AttachmentList::const_iterator it = snapAtts.begin();
-                     it != snapAtts.end();
-                     ++it)
+                for (MediaData::AttachmentList::const_iterator it = snapAtts.begin(); it != snapAtts.end(); ++it)
                 {
                     MediumAttachment *pAttach = *it;
@@ -4419,5 +3875,5 @@
                         if (    pAttach->i_getDevice() == aDevice
                              && pAttach->i_getPort() == aControllerPort
-                             && pAttach->i_getControllerName() == aControllerName
+                             && pAttach->i_getControllerName() == aName
                            )
                         {
@@ -4459,5 +3915,5 @@
 
         Utf8Str strFullSnapshotFolder;
-        calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
+        i_calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
 
         ComObjPtr<Medium> diff;
@@ -4474,5 +3930,5 @@
             treeLock.release();
             alock.release();
-            addMediumToRegistry(medium);
+            i_addMediumToRegistry(medium);
             alock.acquire();
             treeLock.acquire();
@@ -4512,5 +3968,5 @@
                  * operation, so protect with the special state */
                 MachineState_T oldState = mData->mMachineState;
-                setMachineState(MachineState_SettingUp);
+                i_setMachineState(MachineState_SettingUp);
 
                 mediumLock.release();
@@ -4528,5 +3984,5 @@
                 mediumLock.acquire();
 
-                setMachineState(oldState);
+                i_setMachineState(oldState);
             }
         }
@@ -4549,5 +4005,5 @@
     rc = attachment->init(this,
                           medium,
-                          aControllerName,
+                          aName,
                           aControllerPort,
                           aDevice,
@@ -4572,5 +4028,5 @@
         treeLock.release();
         alock.release();
-        addMediumToRegistry(medium);
+        i_addMediumToRegistry(medium);
         alock.acquire();
         treeLock.acquire();
@@ -4579,5 +4035,5 @@
 
     /* success: finally remember the attachment */
-    setModified(IsModified_Storage);
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
     mMediaData->mAttachments.push_back(attachment);
@@ -4594,7 +4050,7 @@
 
             rc = medium->i_createMediumLockList(true /* fFailIfInaccessible */,
-                                              true /* fMediumLockWrite */,
-                                              NULL,
-                                              *pMediumLockList);
+                                                true /* fMediumLockWrite */,
+                                                NULL,
+                                                *pMediumLockList);
             alock.acquire();
             if (FAILED(rc))
@@ -4613,5 +4069,5 @@
         if (SUCCEEDED(rc))
         {
-            rc = onStorageDeviceChange(attachment, FALSE /* aRemove */, fSilent);
+            rc = i_onStorageDeviceChange(attachment, FALSE /* aRemove */, fSilent);
             /* Remove lock list in case of error. */
             if (FAILED(rc))
@@ -4629,18 +4085,13 @@
 }
 
-STDMETHODIMP Machine::DetachDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                   LONG aDevice)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d\n",
-                     aControllerName, aControllerPort, aDevice));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::detachDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                              LONG aDevice)
+{
+    LogFlowThisFunc(("aControllerName=\"%s\" aControllerPort=%d aDevice=%d\n",
+                     aName.c_str(), aControllerPort, aDevice));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4649,5 +4100,5 @@
     /* Check for an existing controller. */
     ComObjPtr<StorageController> ctl;
-    rc = getStorageControllerByName(aControllerName, ctl, true /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctl, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
@@ -4656,6 +4107,6 @@
     if (FAILED(rc))
         return setError(E_FAIL,
-                        tr("Could not get type of controller '%ls'"),
-                        aControllerName);
+                        tr("Could not get type of controller '%s'"),
+                        aName.c_str());
 
     bool fSilent = false;
@@ -4663,5 +4114,5 @@
 
     /* Check whether the flag to allow silent storage attachment reconfiguration is set. */
-    strReconfig = getExtraData(Utf8Str("VBoxInternal2/SilentReconfigureWhilePaused"));
+    strReconfig = i_getExtraData(Utf8Str("VBoxInternal2/SilentReconfigureWhilePaused"));
     if (   mData->mMachineState == MachineState_Paused
         && strReconfig == "1")
@@ -4673,22 +4124,22 @@
         fHotplug = true;
 
-    if (fHotplug && !isControllerHotplugCapable(ctrlType))
+    if (fHotplug && !i_isControllerHotplugCapable(ctrlType))
         return setError(VBOX_E_INVALID_VM_STATE,
-                        tr("Controller '%ls' does not support hotplugging"),
-                        aControllerName);
-
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+                        tr("Controller '%s' does not support hotplugging"),
+                        aName.c_str());
+
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
 
     if (fHotplug && !pAttach->i_getHotPluggable())
         return setError(VBOX_E_NOT_SUPPORTED,
-                        tr("The device slot %d on port %d of controller '%ls' does not support hotplugging"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("The device slot %d on port %d of controller '%s' does not support hotplugging"),
+                        aDevice, aControllerPort, aName.c_str());
 
     /*
@@ -4699,5 +4150,5 @@
     {
         alock.release();
-        rc = onStorageDeviceChange(pAttach, TRUE /* aRemove */, fSilent);
+        rc = i_onStorageDeviceChange(pAttach, TRUE /* aRemove */, fSilent);
         alock.acquire();
     }
@@ -4705,5 +4156,5 @@
 
     /* If we are here everything went well and we can delete the implicit now. */
-    rc = detachDevice(pAttach, alock, NULL /* pSnapshot */);
+    rc = i_detachDevice(pAttach, alock, NULL /* pSnapshot */);
 
     alock.release();
@@ -4714,18 +4165,13 @@
 }
 
-STDMETHODIMP Machine::PassthroughDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                        LONG aDevice, BOOL aPassthrough)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aPassthrough=%d\n",
-                     aControllerName, aControllerPort, aDevice, aPassthrough));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::passthroughDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                   LONG aDevice, BOOL aPassthrough)
+{
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aPassthrough=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aPassthrough));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4737,15 +4183,15 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-
-    setModified(IsModified_Storage);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -4754,6 +4200,6 @@
     if (pAttach->i_getType() != DeviceType_DVD)
         return setError(E_INVALIDARG,
-                        tr("Setting passthrough rejected as the device attached to device slot %d on port %d of controller '%ls' is not a DVD"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("Setting passthrough rejected as the device attached to device slot %d on port %d of controller '%s' is not a DVD"),
+                        aDevice, aControllerPort, aName.c_str());
     pAttach->i_updatePassthrough(!!aPassthrough);
 
@@ -4761,31 +4207,27 @@
 }
 
-STDMETHODIMP Machine::TemporaryEjectDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                           LONG aDevice, BOOL aTemporaryEject)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aTemporaryEject=%d\n",
-                     aControllerName, aControllerPort, aDevice, aTemporaryEject));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::temporaryEjectDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                      LONG aDevice, BOOL aTemporaryEject)
+{
+
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aTemporaryEject=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aTemporaryEject));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-
-    setModified(IsModified_Storage);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -4794,6 +4236,6 @@
     if (pAttach->i_getType() != DeviceType_DVD)
         return setError(E_INVALIDARG,
-                        tr("Setting temporary eject flag rejected as the device attached to device slot %d on port %d of controller '%ls' is not a DVD"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("Setting temporary eject flag rejected as the device attached to device slot %d on port %d of controller '%s' is not a DVD"),
+                        aDevice, aControllerPort, aName.c_str());
     pAttach->i_updateTempEject(!!aTemporaryEject);
 
@@ -4801,18 +4243,14 @@
 }
 
-STDMETHODIMP Machine::NonRotationalDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                          LONG aDevice, BOOL aNonRotational)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aNonRotational=%d\n",
-                     aControllerName, aControllerPort, aDevice, aNonRotational));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::nonRotationalDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                     LONG aDevice, BOOL aNonRotational)
+{
+
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aNonRotational=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aNonRotational));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4824,15 +4262,15 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-
-    setModified(IsModified_Storage);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -4841,6 +4279,6 @@
     if (pAttach->i_getType() != DeviceType_HardDisk)
         return setError(E_INVALIDARG,
-                        tr("Setting the non-rotational medium flag rejected as the device attached to device slot %d on port %d of controller '%ls' is not a hard disk"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("Setting the non-rotational medium flag rejected as the device attached to device slot %d on port %d of controller '%s' is not a hard disk"),
+                        aDevice, aControllerPort, aName.c_str());
     pAttach->i_updateNonRotational(!!aNonRotational);
 
@@ -4848,18 +4286,14 @@
 }
 
-STDMETHODIMP Machine::SetAutoDiscardForDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                              LONG aDevice, BOOL aDiscard)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aDiscard=%d\n",
-                     aControllerName, aControllerPort, aDevice, aDiscard));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setAutoDiscardForDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                         LONG aDevice, BOOL aDiscard)
+{
+
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aDiscard=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aDiscard));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4871,15 +4305,15 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-
-    setModified(IsModified_Storage);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -4888,6 +4322,6 @@
     if (pAttach->i_getType() != DeviceType_HardDisk)
         return setError(E_INVALIDARG,
-                        tr("Setting the discard medium flag rejected as the device attached to device slot %d on port %d of controller '%ls' is not a hard disk"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("Setting the discard medium flag rejected as the device attached to device slot %d on port %d of controller '%s' is not a hard disk"),
+                        aDevice, aControllerPort, aName.c_str());
     pAttach->i_updateDiscard(!!aDiscard);
 
@@ -4895,18 +4329,13 @@
 }
 
-STDMETHODIMP Machine::SetHotPluggableForDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                               LONG aDevice, BOOL aHotPluggable)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aHotPluggable=%d\n",
-                     aControllerName, aControllerPort, aDevice, aHotPluggable));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setHotPluggableForDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                          LONG aDevice, BOOL aHotPluggable)
+{
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aHotPluggable=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aHotPluggable));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4918,16 +4347,16 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
 
     /* Check for an existing controller. */
     ComObjPtr<StorageController> ctl;
-    rc = getStorageControllerByName(aControllerName, ctl, true /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctl, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
@@ -4936,13 +4365,13 @@
     if (FAILED(rc))
         return setError(E_FAIL,
-                        tr("Could not get type of controller '%ls'"),
-                        aControllerName);
-
-    if (!isControllerHotplugCapable(ctrlType))
+                        tr("Could not get type of controller '%s'"),
+                        aName.c_str());
+
+    if (!i_isControllerHotplugCapable(ctrlType))
     return setError(VBOX_E_NOT_SUPPORTED,
-                    tr("Controller '%ls' does not support changing the hot-pluggable device flag"),
-                    aControllerName);
-
-    setModified(IsModified_Storage);
+                    tr("Controller '%s' does not support changing the hot-pluggable device flag"),
+                    aName.c_str());
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -4951,6 +4380,6 @@
     if (pAttach->i_getType() == DeviceType_Floppy)
         return setError(E_INVALIDARG,
-                        tr("Setting the hot-pluggable device flag rejected as the device attached to device slot %d on port %d of controller '%ls' is a floppy drive"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("Setting the hot-pluggable device flag rejected as the device attached to device slot %d on port %d of controller '%s' is a floppy drive"),
+                        aDevice, aControllerPort, aName.c_str());
     pAttach->i_updateHotPluggable(!!aHotPluggable);
 
@@ -4958,30 +4387,25 @@
 }
 
-STDMETHODIMP Machine::SetNoBandwidthGroupForDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                                   LONG aDevice)
+HRESULT Machine::setNoBandwidthGroupForDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                              LONG aDevice)
 {
     int rc = S_OK;
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d\n",
-                     aControllerName, aControllerPort, aDevice));
-
-    rc = SetBandwidthGroupForDevice(aControllerName, aControllerPort, aDevice, NULL);
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d\n",
+                     aName.c_str(), aControllerPort, aDevice));
+
+    rc = setBandwidthGroupForDevice(aName, aControllerPort, aDevice, NULL);
 
     return rc;
 }
 
-STDMETHODIMP Machine::SetBandwidthGroupForDevice(IN_BSTR aControllerName, LONG aControllerPort,
-                                                 LONG aDevice, IBandwidthGroup *aBandwidthGroup)
-{
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d\n",
-                     aControllerName, aControllerPort, aDevice));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::setBandwidthGroupForDevice(const com::Utf8Str &aName, LONG aControllerPort,
+                                            LONG aDevice, const ComPtr<IBandwidthGroup> &aBandwidthGroup)
+{
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d\n",
+                     aName.c_str(), aControllerPort, aDevice));
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -4993,18 +4417,19 @@
                         Global::stringifyMachineState(mData->mMachineState));
 
-    MediumAttachment *pAttach = findAttachment(mMediaData->mAttachments,
-                                               aControllerName,
-                                               aControllerPort,
-                                               aDevice);
+    MediumAttachment *pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                 Bstr(aName).raw(),
+                                                 aControllerPort,
+                                                 aDevice);
     if (!pAttach)
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-
-    setModified(IsModified_Storage);
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
-    ComObjPtr<BandwidthGroup> group = static_cast<BandwidthGroup*>(aBandwidthGroup);
+    IBandwidthGroup *iB = aBandwidthGroup;
+    ComObjPtr<BandwidthGroup> group = static_cast<BandwidthGroup*>(iB);
     if (aBandwidthGroup && group.isNull())
         return setError(E_INVALIDARG, "The given bandwidth group pointer is invalid");
@@ -5017,5 +4442,5 @@
         /* Get the bandwidth group object and release it - this must not fail. */
         ComObjPtr<BandwidthGroup> pBandwidthGroupOld;
-        rc = getBandwidthGroup(strBandwidthGroupOld, pBandwidthGroupOld, false);
+        rc = i_getBandwidthGroup(strBandwidthGroupOld, pBandwidthGroupOld, false);
         Assert(SUCCEEDED(rc));
 
@@ -5033,15 +4458,15 @@
 }
 
-STDMETHODIMP Machine::AttachDeviceWithoutMedium(IN_BSTR aControllerName,
-                                                LONG    aControllerPort,
-                                                LONG    aDevice,
-                                                DeviceType_T aType)
+HRESULT Machine::attachDeviceWithoutMedium(const com::Utf8Str &aName,
+                                           LONG aControllerPort,
+                                           LONG aDevice,
+                                           DeviceType_T aType)
 {
      HRESULT rc = S_OK;
 
-     LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aType=%d aMedium=%p\n",
-                      aControllerName, aControllerPort, aDevice, aType));
-
-     rc = AttachDevice(aControllerName, aControllerPort, aDevice, aType, NULL);
+     LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aType=%d aMedium=%p\n",
+                      aName.c_str(), aControllerPort, aDevice, aType));
+
+     rc = AttachDevice(Bstr(aName).raw(), aControllerPort, aDevice, aType, NULL);
 
      return rc;
@@ -5049,33 +4474,27 @@
 
 
-
-STDMETHODIMP Machine::UnmountMedium(IN_BSTR aControllerName,
-                                    LONG    aControllerPort,
-                                    LONG    aDevice,
-                                    BOOL    aForce)
+HRESULT Machine::unmountMedium(const com::Utf8Str &aName,
+                               LONG aControllerPort,
+                               LONG aDevice,
+                               BOOL aForce)
 {
      int rc = S_OK;
-     LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d",
-                      aControllerName, aControllerPort, aForce));
-
-     rc = MountMedium(aControllerName, aControllerPort, aDevice, NULL, aForce);
+     LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d",
+                      aName.c_str(), aControllerPort, aForce));
+
+     rc = mountMedium(aName, aControllerPort, aDevice, NULL, aForce);
 
      return rc;
 }
 
-STDMETHODIMP Machine::MountMedium(IN_BSTR aControllerName,
-                                  LONG aControllerPort,
-                                  LONG aDevice,
-                                  IMedium *aMedium,
-                                  BOOL aForce)
+HRESULT Machine::mountMedium(const com::Utf8Str &aName,
+                             LONG aControllerPort,
+                             LONG aDevice,
+                             const ComPtr<IMedium> &aMedium,
+                             BOOL aForce)
 {
     int rc = S_OK;
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d aForce=%d\n",
-                     aControllerName, aControllerPort, aDevice, aForce));
-
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d aForce=%d\n",
+                     aName.c_str(), aControllerPort, aDevice, aForce));
 
     // request the host lock first, since might be calling Host methods for getting host drives;
@@ -5085,12 +4504,12 @@
                                   &mParent->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS);
 
-    ComObjPtr<MediumAttachment> pAttach = findAttachment(mMediaData->mAttachments,
-                                                         aControllerName,
-                                                         aControllerPort,
-                                                         aDevice);
+    ComObjPtr<MediumAttachment> pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                           Bstr(aName).raw(),
+                                                           aControllerPort,
+                                                           aDevice);
     if (pAttach.isNull())
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No drive attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
+                        tr("No drive attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
 
     /* Remember previously mounted medium. The medium before taking the
@@ -5099,5 +4518,6 @@
     oldmedium = pAttach->i_getMedium();
 
-    ComObjPtr<Medium> pMedium = static_cast<Medium*>(aMedium);
+    IMedium *iM = aMedium;
+    ComObjPtr<Medium> pMedium = static_cast<Medium*>(iM);
     if (aMedium && pMedium.isNull())
         return setError(E_INVALIDARG, "The given medium pointer is invalid");
@@ -5118,12 +4538,12 @@
             default:
                 return setError(VBOX_E_INVALID_OBJECT_STATE,
-                                tr("The device at port %d, device %d of controller '%ls' of this virtual machine is not removeable"),
+                                tr("The device at port %d, device %d of controller '%s' of this virtual machine is not removeable"),
                                 aControllerPort,
                                 aDevice,
-                                aControllerName);
-        }
-    }
-
-    setModified(IsModified_Storage);
+                                aName.c_str());
+        }
+    }
+
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
 
@@ -5131,8 +4551,8 @@
         // The backup operation makes the pAttach reference point to the
         // old settings. Re-get the correct reference.
-        pAttach = findAttachment(mMediaData->mAttachments,
-                                 aControllerName,
-                                 aControllerPort,
-                                 aDevice);
+        pAttach = i_findAttachment(mMediaData->mAttachments,
+                                   Bstr(aName).raw(),
+                                   aControllerPort,
+                                   aDevice);
         if (!oldmedium.isNull())
             oldmedium->i_removeBackReference(mData->mUuid);
@@ -5143,5 +4563,5 @@
             mediumLock.release();
             multiLock.release();
-            addMediumToRegistry(pMedium);
+            i_addMediumToRegistry(pMedium);
             multiLock.acquire();
             mediumLock.acquire();
@@ -5152,9 +4572,9 @@
     }
 
-    setModified(IsModified_Storage);
+    i_setModified(IsModified_Storage);
 
     mediumLock.release();
     multiLock.release();
-    rc = onMediumChange(pAttach, aForce);
+    rc = i_onMediumChange(pAttach, aForce);
     multiLock.acquire();
     mediumLock.acquire();
@@ -5165,8 +4585,8 @@
         if (!pMedium.isNull())
             pMedium->i_removeBackReference(mData->mUuid);
-        pAttach = findAttachment(mMediaData->mAttachments,
-                                 aControllerName,
-                                 aControllerPort,
-                                 aDevice);
+        pAttach = i_findAttachment(mMediaData->mAttachments,
+                                   Bstr(aName).raw(),
+                                   aControllerPort,
+                                   aDevice);
         /* If the attachment is gone in the meantime, bail out. */
         if (pAttach.isNull())
@@ -5185,135 +4605,97 @@
     return rc;
 }
-
-STDMETHODIMP Machine::GetMedium(IN_BSTR aControllerName,
-                                LONG aControllerPort,
-                                LONG aDevice,
-                                IMedium **aMedium)
-{
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d\n",
-                     aControllerName, aControllerPort, aDevice));
-
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-    CheckComArgOutPointerValid(aMedium);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::getMedium(const com::Utf8Str &aName,
+                           LONG aControllerPort,
+                           LONG aDevice,
+                           ComPtr<IMedium> &aMedium)
+{
+    LogFlowThisFunc(("aName=\"%s\" aControllerPort=%d aDevice=%d\n",
+                     aName.c_str(), aControllerPort, aDevice));
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aMedium = NULL;
-
-    ComObjPtr<MediumAttachment> pAttach = findAttachment(mMediaData->mAttachments,
-                                                         aControllerName,
-                                                         aControllerPort,
-                                                         aDevice);
+    aMedium = NULL;
+
+    ComObjPtr<MediumAttachment> pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                           Bstr(aName).raw(),
+                                                           aControllerPort,
+                                                           aDevice);
     if (pAttach.isNull())
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-    pAttach->i_getMedium().queryInterfaceTo(aMedium);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetSerialPort(ULONG slot, ISerialPort **port)
-{
-    CheckComArgOutPointerValid(port);
-    CheckComArgExpr(slot, slot < RT_ELEMENTS(mSerialPorts));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+    pAttach->i_getMedium().queryInterfaceTo(aMedium.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getSerialPort(ULONG aSlot, ComPtr<ISerialPort> &aPort)
+{
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mSerialPorts[slot].queryInterfaceTo(port);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetParallelPort(ULONG slot, IParallelPort **port)
-{
-    CheckComArgOutPointerValid(port);
-    CheckComArgExpr(slot, slot < RT_ELEMENTS(mParallelPorts));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mSerialPorts[aSlot].queryInterfaceTo(aPort.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getParallelPort(ULONG aSlot, ComPtr<IParallelPort> &aPort)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mParallelPorts[slot].queryInterfaceTo(port);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetNetworkAdapter(ULONG slot, INetworkAdapter **adapter)
-{
-    CheckComArgOutPointerValid(adapter);
+    mParallelPorts[aSlot].queryInterfaceTo(aPort.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getNetworkAdapter(ULONG aSlot, ComPtr<INetworkAdapter> &aAdapter)
+{
     /* Do not assert if slot is out of range, just return the advertised
        status.  testdriver/vbox.py triggers this in logVmInfo. */
-    if (slot >= mNetworkAdapters.size())
+    if (aSlot >= mNetworkAdapters.size())
         return setError(E_INVALIDARG,
                         tr("No network adapter in slot %RU32 (total %RU32 adapters)"),
-                        slot, mNetworkAdapters.size());
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+                        aSlot, mNetworkAdapters.size());
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    mNetworkAdapters[slot].queryInterfaceTo(adapter);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetExtraDataKeys(ComSafeArrayOut(BSTR, aKeys))
-{
-    CheckComArgOutSafeArrayPointerValid(aKeys);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    mNetworkAdapters[aSlot].queryInterfaceTo(aAdapter.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getExtraDataKeys(std::vector<com::Utf8Str> &aKeys)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     com::SafeArray<BSTR> saKeys(mData->pMachineConfigFile->mapExtraDataItems.size());
-    int i = 0;
+    aKeys.resize(mData->pMachineConfigFile->mapExtraDataItems.size());
+    size_t i = 0;
     for (settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.begin();
          it != mData->pMachineConfigFile->mapExtraDataItems.end();
          ++it, ++i)
-    {
-        const Utf8Str &strKey = it->first;
-        strKey.cloneTo(&saKeys[i]);
-    }
-    saKeys.detachTo(ComSafeArrayOutArg(aKeys));
-
-    return S_OK;
-  }
+        aKeys[i] = it->first;
+
+    return S_OK;
+}
 
   /**
    *  @note Locks this object for reading.
    */
-STDMETHODIMP Machine::GetExtraData(IN_BSTR aKey,
-                                   BSTR *aValue)
-{
-    CheckComArgStrNotEmptyOrNull(aKey);
-    CheckComArgOutPointerValid(aValue);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getExtraData(const com::Utf8Str &aKey,
+                              com::Utf8Str &aValue)
+{
     /* start with nothing found */
-    Bstr bstrResult("");
+    aValue = "";
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(Utf8Str(aKey));
+    settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(aKey);
     if (it != mData->pMachineConfigFile->mapExtraDataItems.end())
         // found:
-        bstrResult = it->second; // source is a Utf8Str
+        aValue = it->second; // source is a Utf8Str
 
     /* return the result to caller (may be empty) */
-    bstrResult.cloneTo(aValue);
-
     return S_OK;
 }
@@ -5322,13 +4704,6 @@
    *  @note Locks mParent for writing + this object for writing.
    */
-STDMETHODIMP Machine::SetExtraData(IN_BSTR aKey, IN_BSTR aValue)
-{
-    CheckComArgStrNotEmptyOrNull(aKey);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    Utf8Str strKey(aKey);
-    Utf8Str strValue(aValue);
+HRESULT Machine::setExtraData(const com::Utf8Str &aKey, const com::Utf8Str &aValue)
+{
     Utf8Str strOldValue;            // empty
 
@@ -5343,5 +4718,5 @@
     {
         AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); // hold read lock only while looking up
-        settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(strKey);
+        settings::StringsMap::const_iterator it = mData->pMachineConfigFile->mapExtraDataItems.find(aKey);
         if (it != mData->pMachineConfigFile->mapExtraDataItems.end())
             strOldValue = it->second;
@@ -5349,5 +4724,5 @@
 
     bool fChanged;
-    if ((fChanged = (strOldValue != strValue)))
+    if ((fChanged = (strOldValue != aValue)))
     {
         // ask for permission from all listeners outside the locks;
@@ -5357,5 +4732,5 @@
         Bstr bstrValue(aValue);
 
-        if (!mParent->i_onExtraDataCanChange(mData->mUuid, aKey, bstrValue.raw(), error))
+        if (!mParent->i_onExtraDataCanChange(mData->mUuid, Bstr(aKey).raw(), bstrValue.raw(), error))
         {
             const char *sep = error.isEmpty() ? "" : ": ";
@@ -5364,7 +4739,7 @@
                             sep, err));
             return setError(E_ACCESSDENIED,
-                            tr("Could not set extra data because someone refused the requested change of '%ls' to '%ls'%s%ls"),
-                            aKey,
-                            bstrValue.raw(),
+                            tr("Could not set extra data because someone refused the requested change of '%s' to '%s'%s%ls"),
+                            aKey.c_str(),
+                            aValue.c_str(),
                             sep,
                             err);
@@ -5374,18 +4749,18 @@
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-        if (isSnapshotMachine())
-        {
-            HRESULT rc = checkStateDependency(MutableStateDep);
+        if (i_isSnapshotMachine())
+        {
+            HRESULT rc = i_checkStateDependency(MutableStateDep);
             if (FAILED(rc)) return rc;
         }
 
-        if (strValue.isEmpty())
-            mData->pMachineConfigFile->mapExtraDataItems.erase(strKey);
+        if (aValue.isEmpty())
+            mData->pMachineConfigFile->mapExtraDataItems.erase(aKey);
         else
-            mData->pMachineConfigFile->mapExtraDataItems[strKey] = strValue;
+            mData->pMachineConfigFile->mapExtraDataItems[aKey] = aValue;
                 // creates a new key if needed
 
         bool fNeedsGlobalSaveSettings = false;
-        saveSettings(&fNeedsGlobalSaveSettings);
+        i_saveSettings(&fNeedsGlobalSaveSettings);
 
         if (fNeedsGlobalSaveSettings)
@@ -5400,31 +4775,23 @@
     // fire notification outside the lock
     if (fChanged)
-        mParent->i_onExtraDataChange(mData->mUuid, aKey, aValue);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::SetSettingsFilePath(IN_BSTR aFilePath, IProgress **aProgress)
-{
-    CheckComArgStrNotEmptyOrNull(aFilePath);
-    CheckComArgOutPointerValid(aProgress);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    *aProgress = NULL;
+        mParent->i_onExtraDataChange(mData->mUuid, Bstr(aKey).raw(), Bstr(aValue).raw());
+
+    return S_OK;
+}
+
+HRESULT Machine::setSettingsFilePath(const com::Utf8Str &aSettingsFilePath, ComPtr<IProgress> &aProgress)
+{
+    aProgress = NULL;
+    NOREF(aSettingsFilePath);
     ReturnComNotImplemented();
 }
 
-STDMETHODIMP Machine::SaveSettings()
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::saveSettings()
+{
     AutoWriteLock mlock(this COMMA_LOCKVAL_SRC_POS);
 
     /* when there was auto-conversion, we want to save the file even if
      * the VM is saved */
-    HRESULT rc = checkStateDependency(MutableOrSavedStateDep);
+    HRESULT rc = i_checkStateDependency(MutableOrSavedStateDep);
     if (FAILED(rc)) return rc;
 
@@ -5434,5 +4801,5 @@
     /* save all VM data excluding snapshots */
     bool fNeedsGlobalSaveSettings = false;
-    rc = saveSettings(&fNeedsGlobalSaveSettings);
+    rc = i_saveSettings(&fNeedsGlobalSaveSettings);
     mlock.release();
 
@@ -5447,12 +4814,10 @@
 }
 
-STDMETHODIMP Machine::DiscardSettings()
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+
+HRESULT Machine::discardSettings()
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -5461,5 +4826,5 @@
      *  been actually changed
      */
-    rollback(true /* aNotify */);
+    i_rollback(true /* aNotify */);
 
     return S_OK;
@@ -5467,6 +4832,6 @@
 
 /** @note Locks objects! */
-STDMETHODIMP Machine::Unregister(CleanupMode_T cleanupMode,
-                                 ComSafeArrayOut(IMedium*, aMedia))
+HRESULT Machine::unregister(CleanupMode_T aCleanupMode,
+                            std::vector<ComPtr<IMedium> > &aMedia)
 {
     // use AutoLimitedCaller because this call is valid on inaccessible machines as well
@@ -5476,5 +4841,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Guid id(getId());
+    Guid id(i_getId());
 
     if (mData->mSession.mState != SessionState_Unlocked)
@@ -5484,5 +4849,5 @@
 
     // wait for state dependents to drop to zero
-    ensureNoStateDependencies();
+    i_ensureNoStateDependencies();
 
     if (!mData->mAccessible)
@@ -5498,5 +4863,5 @@
 
         mParent->i_unregisterMachine(this, id);
-            // calls VirtualBox::saveSettings()
+            // calls VirtualBox::i_saveSettings()
 
         return S_OK;
@@ -5522,5 +4887,5 @@
     if (mData->mFirstSnapshot)
         cSnapshots = mData->mFirstSnapshot->i_getAllChildrenCount() + 1;
-    if (cSnapshots && cleanupMode == CleanupMode_UnregisterOnly)
+    if (cSnapshots && aCleanupMode == CleanupMode_UnregisterOnly)
         // fail now before we start detaching media
         return setError(VBOX_E_INVALID_OBJECT_STATE,
@@ -5544,6 +4909,6 @@
     {
         // we have media attachments: detach them all and add the Medium objects to our list
-        if (cleanupMode != CleanupMode_UnregisterOnly)
-            detachAllMedia(alock, NULL /* pSnapshot */, cleanupMode, llMedia);
+        if (aCleanupMode != CleanupMode_UnregisterOnly)
+            i_detachAllMedia(alock, NULL /* pSnapshot */, aCleanupMode, llMedia);
         else
             return setError(VBOX_E_INVALID_OBJECT_STATE,
@@ -5571,5 +4936,5 @@
 
         // GO!
-        pFirstSnapshot->i_uninitRecursively(alock, cleanupMode, llMedia, mData->llFilesToDelete);
+        pFirstSnapshot->i_uninitRecursively(alock, aCleanupMode, llMedia, mData->llFilesToDelete);
 
         mData->mMachineState = oldState;
@@ -5578,10 +4943,10 @@
     if (FAILED(rc))
     {
-        rollbackMedia();
+        i_rollbackMedia();
         return rc;
     }
 
     // commit all the media changes made above
-    commitMedia();
+    i_commitMedia();
 
     mData->mRegistered = false;
@@ -5591,9 +4956,11 @@
 
     // return media to caller
-    SafeIfaceArray<IMedium> sfaMedia(llMedia);
-    sfaMedia.detachTo(ComSafeArrayOutArg(aMedia));
+    size_t i = 0;
+    aMedia.resize(llMedia.size());
+    for (MediaList::iterator it = llMedia.begin(); it != llMedia.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aMedia[i].asOutParam());
 
     mParent->i_unregisterMachine(this, id);
-            // calls VirtualBox::saveSettings() and VirtualBox::i_saveModifiedRegistries()
+            // calls VirtualBox::i_saveSettings() and VirtualBox::saveModifiedRegistries()
 
     return S_OK;
@@ -5608,14 +4975,9 @@
 };
 
-STDMETHODIMP Machine::DeleteConfig(ComSafeArrayIn(IMedium*, aMedia), IProgress **aProgress)
-{
-    LogFlowFuncEnter();
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::deleteConfig(const std::vector<ComPtr<IMedium> > &aMedia, ComPtr<IProgress> &aProgress)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -5626,12 +4988,11 @@
     DeleteTask *pTask = new DeleteTask;
     pTask->pMachine = this;
-    com::SafeIfaceArray<IMedium> sfaMedia(ComSafeArrayInArg(aMedia));
 
     // collect files to delete
     pTask->llFilesToDelete = mData->llFilesToDelete;            // saved states pushed here by Unregister()
 
-    for (size_t i = 0; i < sfaMedia.size(); ++i)
-    {
-        IMedium *pIMedium(sfaMedia[i]);
+    for (size_t i = 0; i < aMedia.size(); ++i)
+    {
+        IMedium *pIMedium(aMedia[i]);
         ComObjPtr<Medium> pMedium = static_cast<Medium*>(pIMedium);
         if (pMedium.isNull())
@@ -5650,5 +5011,5 @@
 
     pTask->pProgress.createObject();
-    pTask->pProgress->init(getVirtualBox(),
+    pTask->pProgress->init(i_getVirtualBox(),
                            static_cast<IMachine*>(this) /* aInitiator */,
                            Bstr(tr("Deleting files")).raw(),
@@ -5665,5 +5026,5 @@
                              "MachineDelete");
 
-    pTask->pProgress.queryInterfaceTo(aProgress);
+    pTask->pProgress.queryInterfaceTo(aProgress.asOutParam());
 
     if (RT_FAILURE(vrc))
@@ -5695,5 +5056,5 @@
     Assert(pTask->pProgress);
 
-    HRESULT rc = pTask->pMachine->deleteTaskWorker(*pTask);
+    HRESULT rc = pTask->pMachine->i_deleteTaskWorker(*pTask);
     pTask->pProgress->i_notifyComplete(rc);
 
@@ -5712,5 +5073,5 @@
  * @return
  */
-HRESULT Machine::deleteTaskWorker(DeleteTask &task)
+HRESULT Machine::i_deleteTaskWorker(DeleteTask &task)
 {
     AutoCaller autoCaller(this);
@@ -5735,5 +5096,5 @@
 
         MachineState_T oldState = mData->mMachineState;
-        setMachineState(MachineState_SettingUp);
+        i_setMachineState(MachineState_SettingUp);
         alock.release();
         for (size_t i = 0; i < task.llMediums.size(); ++i)
@@ -5763,7 +5124,7 @@
 
             /* Close the medium, deliberately without checking the return
-             * code, and without leaving any trace in the error info, as
-             * a failure here is a very minor issue, which shouldn't happen
-             * as above we even managed to delete the medium. */
+-            * code, and without leaving any trace in the error info, as
+-            * a failure here is a very minor issue, which shouldn't happen
+-            * as above we even managed to delete the medium. */
             {
                 ErrorInfoKeeper eik;
@@ -5771,5 +5132,5 @@
             }
         }
-        setMachineState(oldState);
+        i_setMachineState(oldState);
         alock.acquire();
 
@@ -5846,5 +5207,5 @@
              * some private files there that we don't want to delete) */
             Utf8Str strFullSnapshotFolder;
-            calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
+            i_calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
             Assert(!strFullSnapshotFolder.isEmpty());
             if (RTDirExists(strFullSnapshotFolder.c_str()))
@@ -5854,5 +5215,5 @@
             // if it matches the VM name
             Utf8Str settingsDir;
-            if (isInOwnDir(&settingsDir))
+            if (i_isInOwnDir(&settingsDir))
                 RTDirRemove(settingsDir.c_str());
         }
@@ -5867,11 +5228,6 @@
 }
 
-STDMETHODIMP Machine::FindSnapshot(IN_BSTR aNameOrId, ISnapshot **aSnapshot)
-{
-    CheckComArgOutPointerValid(aSnapshot);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::findSnapshot(const com::Utf8Str &aNameOrId, ComPtr<ISnapshot> &aSnapshot)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -5879,52 +5235,44 @@
     HRESULT rc;
 
-    if (!aNameOrId || !*aNameOrId)
-        // null case (caller wants root snapshot): findSnapshotById() handles this
-        rc = findSnapshotById(Guid(), pSnapshot, true /* aSetError */);
+    if (aNameOrId.isEmpty())
+        // null case (caller wants root snapshot): i_findSnapshotById() handles this
+        rc = i_findSnapshotById(Guid(), pSnapshot, true /* aSetError */);
     else
     {
         Guid uuid(aNameOrId);
         if (uuid.isValid())
-            rc = findSnapshotById(uuid, pSnapshot, true /* aSetError */);
+            rc = i_findSnapshotById(uuid, pSnapshot, true /* aSetError */);
         else
-            rc = findSnapshotByName(Utf8Str(aNameOrId), pSnapshot, true /* aSetError */);
-    }
-    pSnapshot.queryInterfaceTo(aSnapshot);
+            rc = i_findSnapshotByName(aNameOrId, pSnapshot, true /* aSetError */);
+    }
+    pSnapshot.queryInterfaceTo(aSnapshot.asOutParam());
 
     return rc;
 }
 
-STDMETHODIMP Machine::CreateSharedFolder(IN_BSTR aName, IN_BSTR aHostPath, BOOL aWritable, BOOL aAutoMount)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgStrNotEmptyOrNull(aHostPath);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::createSharedFolder(const com::Utf8Str &aName, const com::Utf8Str &aHostPath, BOOL  aWritable, BOOL  aAutomount)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
-    Utf8Str strName(aName);
-
     ComObjPtr<SharedFolder> sharedFolder;
-    rc = findSharedFolder(strName, sharedFolder, false /* aSetError */);
+    rc = i_findSharedFolder(aName, sharedFolder, false /* aSetError */);
     if (SUCCEEDED(rc))
         return setError(VBOX_E_OBJECT_IN_USE,
                         tr("Shared folder named '%s' already exists"),
-                        strName.c_str());
+                        aName.c_str());
 
     sharedFolder.createObject();
-    rc = sharedFolder->init(getMachine(),
-                            strName,
+    rc = sharedFolder->init(i_getMachine(),
+                            aName,
                             aHostPath,
                             !!aWritable,
-                            !!aAutoMount,
+                            !!aAutomount,
                             true /* fFailOnError */);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_SharedFolders);
+    i_setModified(IsModified_SharedFolders);
     mHWData.backup();
     mHWData->mSharedFolders.push_back(sharedFolder);
@@ -5932,26 +5280,21 @@
     /* inform the direct session if any */
     alock.release();
-    onSharedFolderChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::RemoveSharedFolder(IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    i_onSharedFolderChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::removeSharedFolder(const com::Utf8Str &aName)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     ComObjPtr<SharedFolder> sharedFolder;
-    rc = findSharedFolder(aName, sharedFolder, true /* aSetError */);
+    rc = i_findSharedFolder(aName, sharedFolder, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_SharedFolders);
+    i_setModified(IsModified_SharedFolders);
     mHWData.backup();
     mHWData->mSharedFolders.remove(sharedFolder);
@@ -5959,18 +5302,13 @@
     /* inform the direct session if any */
     alock.release();
-    onSharedFolderChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::CanShowConsoleWindow(BOOL *aCanShow)
-{
-    CheckComArgOutPointerValid(aCanShow);
-
+    i_onSharedFolderChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::canShowConsoleWindow(BOOL *aCanShow)
+{
     /* start with No */
     *aCanShow = FALSE;
-
-    AutoCaller autoCaller(this);
-    AssertComRCReturnRC(autoCaller.rc());
 
     ComPtr<IInternalSessionControl> directControl;
@@ -5994,11 +5332,6 @@
 }
 
-STDMETHODIMP Machine::ShowConsoleWindow(LONG64 *aWinId)
-{
-    CheckComArgOutPointerValid(aWinId);
-
-    AutoCaller autoCaller(this);
-    AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
-
+HRESULT Machine::showConsoleWindow(LONG64 *aWinId)
+{
     ComPtr<IInternalSessionControl> directControl;
     {
@@ -6025,22 +5358,21 @@
  * Look up a guest property in VBoxSVC's internal structures.
  */
-HRESULT Machine::getGuestPropertyFromService(IN_BSTR aName,
-                                             BSTR *aValue,
-                                             LONG64 *aTimestamp,
-                                             BSTR *aFlags) const
+HRESULT Machine::i_getGuestPropertyFromService(const com::Utf8Str &aName,
+                                               com::Utf8Str &aValue,
+                                               LONG64 *aTimestamp,
+                                               com::Utf8Str &aFlags) const
 {
     using namespace guestProp;
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-    Utf8Str strName(aName);
-    HWData::GuestPropertyMap::const_iterator it = mHWData->mGuestProperties.find(strName);
+    HWData::GuestPropertyMap::const_iterator it = mHWData->mGuestProperties.find(aName);
 
     if (it != mHWData->mGuestProperties.end())
     {
         char szFlags[MAX_FLAGS_LEN + 1];
-        it->second.strValue.cloneTo(aValue);
+        aValue = it->second.strValue;
         *aTimestamp = it->second.mTimestamp;
         writeFlags(it->second.mFlags, szFlags);
-        Bstr(szFlags).cloneTo(aFlags);
+        aFlags = Utf8Str(szFlags);
     }
 
@@ -6054,10 +5386,13 @@
  *          VBoxSVC.
  */
-HRESULT Machine::getGuestPropertyFromVM(IN_BSTR aName,
-                                        BSTR *aValue,
-                                        LONG64 *aTimestamp,
-                                        BSTR *aFlags) const
-{
-    HRESULT rc;
+HRESULT Machine::i_getGuestPropertyFromVM(const com::Utf8Str &aName,
+                                          com::Utf8Str &aValue,
+                                          LONG64 *aTimestamp,
+                                          com::Utf8Str &aFlags) const
+{
+    HRESULT rc = S_OK;
+    BSTR bValue;
+    BSTR bFlags;
+
     ComPtr<IInternalSessionControl> directControl;
     directControl = mData->mSession.mDirectControl;
@@ -6072,47 +5407,47 @@
         rc = E_ACCESSDENIED;
     else
-        rc = directControl->AccessGuestProperty(aName, NULL, NULL,
+        rc = directControl->AccessGuestProperty(Bstr(aName).raw(), NULL, NULL,
                                                 false /* isSetter */,
-                                                aValue, aTimestamp, aFlags);
+                                                &bValue, aTimestamp, &bFlags);
+
+    aValue = bValue;
+    aFlags = bFlags;
+
     return rc;
 }
 #endif // VBOX_WITH_GUEST_PROPS
 
-STDMETHODIMP Machine::GetGuestProperty(IN_BSTR aName,
-                                       BSTR *aValue,
-                                       LONG64 *aTimestamp,
-                                       BSTR *aFlags)
+HRESULT Machine::getGuestProperty(const com::Utf8Str &aName,
+                                  com::Utf8Str &aValue,
+                                  LONG64 *aTimestamp,
+                                  com::Utf8Str &aFlags)
 {
 #ifndef VBOX_WITH_GUEST_PROPS
     ReturnComNotImplemented();
 #else // VBOX_WITH_GUEST_PROPS
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgOutPointerValid(aValue);
-    CheckComArgOutPointerValid(aTimestamp);
-    CheckComArgOutPointerValid(aFlags);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    HRESULT rc = getGuestPropertyFromVM(aName, aValue, aTimestamp, aFlags);
+
+    HRESULT rc = i_getGuestPropertyFromVM(aName, aValue, aTimestamp, aFlags);
+
     if (rc == E_ACCESSDENIED)
         /* The VM is not running or the service is not (yet) accessible */
-        rc = getGuestPropertyFromService(aName, aValue, aTimestamp, aFlags);
+        rc = i_getGuestPropertyFromService(aName, aValue, aTimestamp, aFlags);
     return rc;
 #endif // VBOX_WITH_GUEST_PROPS
 }
 
-STDMETHODIMP Machine::GetGuestPropertyValue(IN_BSTR aName, BSTR *aValue)
+HRESULT Machine::getGuestPropertyValue(const com::Utf8Str &aProperty, com::Utf8Str &aValue)
 {
     LONG64 dummyTimestamp;
-    Bstr dummyFlags;
-    return GetGuestProperty(aName, aValue, &dummyTimestamp, dummyFlags.asOutParam());
-}
-
-STDMETHODIMP Machine::GetGuestPropertyTimestamp(IN_BSTR aName, LONG64 *aTimestamp)
-{
-    Bstr dummyValue;
-    Bstr dummyFlags;
-    return GetGuestProperty(aName, dummyValue.asOutParam(), aTimestamp, dummyFlags.asOutParam());
+    com::Utf8Str dummyFlags;
+    HRESULT rc = getGuestProperty(aProperty, aValue, &dummyTimestamp, dummyFlags);
+    return rc;
+
+}
+HRESULT Machine::getGuestPropertyTimestamp(const com::Utf8Str &aProperty, LONG64 *aValue)
+{
+    com::Utf8Str dummyFlags;
+    com::Utf8Str dummyValue;
+    HRESULT rc = getGuestProperty(aProperty, dummyValue, aValue, dummyFlags);
+    return rc;
 }
 
@@ -6121,6 +5456,6 @@
  * Set a guest property in VBoxSVC's internal structures.
  */
-HRESULT Machine::setGuestPropertyToService(IN_BSTR aName, IN_BSTR aValue,
-                                           IN_BSTR aFlags)
+HRESULT Machine::i_setGuestPropertyToService(const com::Utf8Str &aName, const com::Utf8Str &aValue,
+                                             const com::Utf8Str &aFlags)
 {
     using namespace guestProp;
@@ -6129,33 +5464,28 @@
     HRESULT rc = S_OK;
 
-    rc = checkStateDependency(MutableStateDep);
+    rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     try
     {
-        Utf8Str utf8Name(aName);
-        Utf8Str utf8Flags(aFlags);
         uint32_t fFlags = NILFLAG;
-        if (   aFlags != NULL
-            && RT_FAILURE(validateFlags(utf8Flags.c_str(), &fFlags)))
-            return setError(E_INVALIDARG,
-                            tr("Invalid guest property flag values: '%ls'"),
-                            aFlags);
-
-        bool fDelete = !RT_VALID_PTR(aValue) || *(aValue) == '\0';
-        HWData::GuestPropertyMap::iterator it = mHWData->mGuestProperties.find(utf8Name);
+        if (aFlags.length() && RT_FAILURE(validateFlags(aFlags.c_str(), &fFlags)))
+            return setError(E_INVALIDARG, tr("Invalid guest property flag values: '%s'"), aFlags.c_str());
+
+        bool fDelete = aValue.isEmpty();
+        HWData::GuestPropertyMap::iterator it = mHWData->mGuestProperties.find(aName);
         if (it == mHWData->mGuestProperties.end())
         {
             if (!fDelete)
             {
-                setModified(IsModified_MachineData);
+                i_setModified(IsModified_MachineData);
                 mHWData.backupEx();
 
                 RTTIMESPEC time;
                 HWData::GuestProperty prop;
-                prop.strValue   = aValue;
+                prop.strValue   = Bstr(aValue).raw();
                 prop.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time));
                 prop.mFlags     = fFlags;
-                mHWData->mGuestProperties[Utf8Str(aName)] = prop;
+                mHWData->mGuestProperties[aName] = prop;
             }
         }
@@ -6164,16 +5494,14 @@
             if (it->second.mFlags & (RDONLYHOST))
             {
-                rc = setError(E_ACCESSDENIED,
-                              tr("The property '%ls' cannot be changed by the host"),
-                              aName);
+                rc = setError(E_ACCESSDENIED, tr("The property '%s' cannot be changed by the host"), aName.c_str());
             }
             else
             {
-                setModified(IsModified_MachineData);
+                i_setModified(IsModified_MachineData);
                 mHWData.backupEx();
 
                 /* The backupEx() operation invalidates our iterator,
                  * so get a new one. */
-                it = mHWData->mGuestProperties.find(utf8Name);
+                it = mHWData->mGuestProperties.find(aName);
                 Assert(it != mHWData->mGuestProperties.end());
 
@@ -6194,5 +5522,5 @@
                 || RTStrSimplePatternMultiMatch(mHWData->mGuestPropertyNotificationPatterns.c_str(),
                                                 RTSTR_MAX,
-                                                utf8Name.c_str(),
+                                                aName.c_str(),
                                                 RTSTR_MAX,
                                                 NULL)
@@ -6202,7 +5530,8 @@
             alock.release();
 
-            mParent->i_onGuestPropertyChange(mData->mUuid, aName,
-                                             aValue ? aValue : Bstr("").raw(),
-                                             aFlags ? aFlags : Bstr("").raw());
+            mParent->i_onGuestPropertyChange(mData->mUuid,
+                                             Bstr(aName).raw(),
+                                             Bstr(aValue).raw(),
+                                             Bstr(aFlags).raw());
         }
     }
@@ -6221,6 +5550,6 @@
  *          VBoxSVC.
  */
-HRESULT Machine::setGuestPropertyToVM(IN_BSTR aName, IN_BSTR aValue,
-                                      IN_BSTR aFlags)
+HRESULT Machine::i_setGuestPropertyToVM(const com::Utf8Str &aName, const com::Utf8Str &aValue,
+                                        const com::Utf8Str &aFlags)
 {
     HRESULT rc;
@@ -6236,5 +5565,5 @@
         else
             /** @todo Fix when adding DeleteGuestProperty(), see defect. */
-            rc = directControl->AccessGuestProperty(aName, aValue, aFlags,
+            rc = directControl->AccessGuestProperty(Bstr(aName).raw(), Bstr(aValue).raw(), Bstr(aFlags).raw(),
                                                     true /* isSetter */,
                                                     &dummy, &dummy64, &dummy);
@@ -6249,34 +5578,26 @@
 #endif // VBOX_WITH_GUEST_PROPS
 
-STDMETHODIMP Machine::SetGuestProperty(IN_BSTR aName, IN_BSTR aValue,
-                                       IN_BSTR aFlags)
+HRESULT Machine::setGuestProperty(const com::Utf8Str &aProperty, const com::Utf8Str &aValue,
+                                  const com::Utf8Str &aFlags)
 {
 #ifndef VBOX_WITH_GUEST_PROPS
     ReturnComNotImplemented();
 #else // VBOX_WITH_GUEST_PROPS
-    CheckComArgStrNotEmptyOrNull(aName);
-    CheckComArgMaybeNull(aFlags);
-    CheckComArgMaybeNull(aValue);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc()))
-        return autoCaller.rc();
-
-    HRESULT rc = setGuestPropertyToVM(aName, aValue, aFlags);
+    HRESULT rc = i_setGuestPropertyToVM(aProperty, aValue, aFlags);
     if (rc == E_ACCESSDENIED)
         /* The VM is not running or the service is not (yet) accessible */
-        rc = setGuestPropertyToService(aName, aValue, aFlags);
+        rc = i_setGuestPropertyToService(aProperty, aValue, aFlags);
     return rc;
 #endif // VBOX_WITH_GUEST_PROPS
 }
 
-STDMETHODIMP Machine::SetGuestPropertyValue(IN_BSTR aName, IN_BSTR aValue)
-{
-    return SetGuestProperty(aName, aValue, NULL);
-}
-
-STDMETHODIMP Machine::DeleteGuestProperty(IN_BSTR aName)
-{
-    return SetGuestProperty(aName, NULL, NULL);
+HRESULT Machine::setGuestPropertyValue(const com::Utf8Str &aProperty, const com::Utf8Str &aValue)
+{
+    return setGuestProperty(aProperty, aValue, "");
+}
+
+HRESULT Machine::deleteGuestProperty(const com::Utf8Str &aName)
+{
+    return setGuestProperty(aName, "", "");
 }
 
@@ -6285,9 +5606,9 @@
  * Enumerate the guest properties in VBoxSVC's internal structures.
  */
-HRESULT Machine::enumerateGuestPropertiesInService
-                (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames),
-                 ComSafeArrayOut(BSTR, aValues),
-                 ComSafeArrayOut(LONG64, aTimestamps),
-                 ComSafeArrayOut(BSTR, aFlags))
+HRESULT Machine::i_enumerateGuestPropertiesInService(const com::Utf8Str &aPatterns,
+                                                     std::vector<com::Utf8Str> &aNames,
+                                                     std::vector<com::Utf8Str> &aValues,
+                                                     std::vector<LONG64> &aTimestamps,
+                                                     std::vector<com::Utf8Str> &aFlags)
 {
     using namespace guestProp;
@@ -6311,8 +5632,5 @@
                                             NULL)
            )
-        {
             propMap.insert(*it);
-        }
-
         it++;
     }
@@ -6324,25 +5642,21 @@
      */
     size_t cEntries = propMap.size();
-    SafeArray<BSTR> names(cEntries);
-    SafeArray<BSTR> values(cEntries);
-    SafeArray<LONG64> timestamps(cEntries);
-    SafeArray<BSTR> flags(cEntries);
-    size_t iProp = 0;
-
-    it = propMap.begin();
-    while (it != propMap.end())
-    {
-         char szFlags[MAX_FLAGS_LEN + 1];
-         it->first.cloneTo(&names[iProp]);
-         it->second.strValue.cloneTo(&values[iProp]);
-         timestamps[iProp] = it->second.mTimestamp;
-         writeFlags(it->second.mFlags, szFlags);
-         Bstr(szFlags).cloneTo(&flags[iProp++]);
-         it++;
-    }
-    names.detachTo(ComSafeArrayOutArg(aNames));
-    values.detachTo(ComSafeArrayOutArg(aValues));
-    timestamps.detachTo(ComSafeArrayOutArg(aTimestamps));
-    flags.detachTo(ComSafeArrayOutArg(aFlags));
+
+    aNames.resize(cEntries);
+    aValues.resize(cEntries);
+    aTimestamps.resize(cEntries);
+    aFlags.resize(cEntries);
+
+    char szFlags[MAX_FLAGS_LEN + 1];
+    size_t i= 0;
+    for (it = propMap.begin(); it != propMap.end(); ++i, ++it)
+    {
+        aNames[i] = it->first;
+        aValues[i] = it->second.strValue;
+        aTimestamps[i] = it->second.mTimestamp;
+        writeFlags(it->second.mFlags, szFlags);
+        aFlags[i] = Utf8Str(szFlags);
+    }
+
     return S_OK;
 }
@@ -6354,9 +5668,9 @@
  *          VBoxSVC.
  */
-HRESULT Machine::enumerateGuestPropertiesOnVM
-                (IN_BSTR aPatterns, ComSafeArrayOut(BSTR, aNames),
-                 ComSafeArrayOut(BSTR, aValues),
-                 ComSafeArrayOut(LONG64, aTimestamps),
-                 ComSafeArrayOut(BSTR, aFlags))
+HRESULT Machine::i_enumerateGuestPropertiesOnVM(const com::Utf8Str &aPatterns,
+                                                std::vector<com::Utf8Str> &aNames,
+                                                std::vector<com::Utf8Str> &aValues,
+                                                std::vector<LONG64> &aTimestamps,
+                                                std::vector<com::Utf8Str> &aFlags)
 {
     HRESULT rc;
@@ -6364,102 +5678,101 @@
     directControl = mData->mSession.mDirectControl;
 
+
+    com::SafeArray<BSTR> bNames;
+    com::SafeArray<BSTR> bValues;
+    com::SafeArray<LONG64> bTimestamps;
+    com::SafeArray<BSTR> bFlags;
+
     if (!directControl)
         rc = E_ACCESSDENIED;
     else
-        rc = directControl->EnumerateGuestProperties
-                     (aPatterns, ComSafeArrayOutArg(aNames),
-                      ComSafeArrayOutArg(aValues),
-                      ComSafeArrayOutArg(aTimestamps),
-                      ComSafeArrayOutArg(aFlags));
+        rc = directControl->EnumerateGuestProperties(Bstr(aPatterns).raw(),
+                                                     ComSafeArrayAsOutParam(bNames),
+                                                     ComSafeArrayAsOutParam(bValues),
+                                                     ComSafeArrayAsOutParam(bTimestamps),
+                                                     ComSafeArrayAsOutParam(bFlags));
+    size_t i;
+    aNames.resize(bNames.size());
+    for (i = 0; i < bNames.size(); ++i)
+        aNames[i] = Utf8Str(bNames[i]);
+    aValues.resize(bValues.size());
+    for (i = 0; i < bValues.size(); ++i)
+        aValues[i] = Utf8Str(bValues[i]);
+    aTimestamps.resize(bTimestamps.size());
+    for (i = 0; i < bTimestamps.size(); ++i)
+        aTimestamps[i] = bTimestamps[i];
+    aFlags.resize(bFlags.size());
+    for (i = 0; i < bFlags.size(); ++i)
+        aFlags[i] = Utf8Str(bFlags[i]);
+
     return rc;
 }
 #endif // VBOX_WITH_GUEST_PROPS
-
-STDMETHODIMP Machine::EnumerateGuestProperties(IN_BSTR aPatterns,
-                                               ComSafeArrayOut(BSTR, aNames),
-                                               ComSafeArrayOut(BSTR, aValues),
-                                               ComSafeArrayOut(LONG64, aTimestamps),
-                                               ComSafeArrayOut(BSTR, aFlags))
+HRESULT Machine::enumerateGuestProperties(const com::Utf8Str &aPatterns,
+                                          std::vector<com::Utf8Str> &aNames,
+                                          std::vector<com::Utf8Str> &aValues,
+                                          std::vector<LONG64> &aTimestamps,
+                                          std::vector<com::Utf8Str> &aFlags)
 {
 #ifndef VBOX_WITH_GUEST_PROPS
     ReturnComNotImplemented();
 #else // VBOX_WITH_GUEST_PROPS
-    CheckComArgMaybeNull(aPatterns);
-    CheckComArgOutSafeArrayPointerValid(aNames);
-    CheckComArgOutSafeArrayPointerValid(aValues);
-    CheckComArgOutSafeArrayPointerValid(aTimestamps);
-    CheckComArgOutSafeArrayPointerValid(aFlags);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    HRESULT rc = enumerateGuestPropertiesOnVM
-                     (aPatterns, ComSafeArrayOutArg(aNames),
-                      ComSafeArrayOutArg(aValues),
-                      ComSafeArrayOutArg(aTimestamps),
-                      ComSafeArrayOutArg(aFlags));
+
+    HRESULT rc = i_enumerateGuestPropertiesOnVM(aPatterns, aNames, aValues, aTimestamps, aFlags);
+
     if (rc == E_ACCESSDENIED)
         /* The VM is not running or the service is not (yet) accessible */
-        rc = enumerateGuestPropertiesInService
-                     (aPatterns, ComSafeArrayOutArg(aNames),
-                      ComSafeArrayOutArg(aValues),
-                      ComSafeArrayOutArg(aTimestamps),
-                      ComSafeArrayOutArg(aFlags));
+        rc = i_enumerateGuestPropertiesInService(aPatterns, aNames, aValues, aTimestamps, aFlags);
     return rc;
 #endif // VBOX_WITH_GUEST_PROPS
 }
 
-STDMETHODIMP Machine::GetMediumAttachmentsOfController(IN_BSTR aName,
-                                                       ComSafeArrayOut(IMediumAttachment*, aAttachments))
+HRESULT Machine::getMediumAttachmentsOfController(const com::Utf8Str &aName,
+                                                  std::vector<ComPtr<IMediumAttachment> > &aMediumAttachments)
 {
     MediaData::AttachmentList atts;
 
-    HRESULT rc = getMediumAttachmentsOfController(aName, atts);
+    HRESULT rc = i_getMediumAttachmentsOfController(aName, atts);
     if (FAILED(rc)) return rc;
 
-    SafeIfaceArray<IMediumAttachment> attachments(atts);
-    attachments.detachTo(ComSafeArrayOutArg(aAttachments));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetMediumAttachment(IN_BSTR aControllerName,
-                                          LONG aControllerPort,
-                                          LONG aDevice,
-                                          IMediumAttachment **aAttachment)
-{
-    LogFlowThisFunc(("aControllerName=\"%ls\" aControllerPort=%d aDevice=%d\n",
-                     aControllerName, aControllerPort, aDevice));
-
-    CheckComArgStrNotEmptyOrNull(aControllerName);
-    CheckComArgOutPointerValid(aAttachment);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    size_t i = 0;
+    aMediumAttachments.resize(atts.size());
+    for (MediaData::AttachmentList::iterator it = atts.begin(); it != atts.end(); ++it, ++i)
+        (*it).queryInterfaceTo(aMediumAttachments[i].asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getMediumAttachment(const com::Utf8Str &aName,
+                                     LONG aControllerPort,
+                                     LONG aDevice,
+                                     ComPtr<IMediumAttachment> &aAttachment)
+{
+    LogFlowThisFunc(("aControllerName=\"%s\" aControllerPort=%d aDevice=%d\n",
+                     aName.c_str(), aControllerPort, aDevice));
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    *aAttachment = NULL;
-
-    ComObjPtr<MediumAttachment> pAttach = findAttachment(mMediaData->mAttachments,
-                                                         aControllerName,
-                                                         aControllerPort,
-                                                         aDevice);
+    aAttachment = NULL;
+
+    ComObjPtr<MediumAttachment> pAttach = i_findAttachment(mMediaData->mAttachments,
+                                                           Bstr(aName).raw(),
+                                                           aControllerPort,
+                                                           aDevice);
     if (pAttach.isNull())
         return setError(VBOX_E_OBJECT_NOT_FOUND,
-                        tr("No storage device attached to device slot %d on port %d of controller '%ls'"),
-                        aDevice, aControllerPort, aControllerName);
-
-    pAttach.queryInterfaceTo(aAttachment);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::AddStorageController(IN_BSTR aName,
-                                           StorageBus_T aConnectionType,
-                                           IStorageController **controller)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
+                        tr("No storage device attached to device slot %d on port %d of controller '%s'"),
+                        aDevice, aControllerPort, aName.c_str());
+
+    pAttach.queryInterfaceTo(aAttachment.asOutParam());
+
+    return S_OK;
+}
+
+
+HRESULT Machine::addStorageController(const com::Utf8Str &aName,
+                                      StorageBus_T aConnectionType,
+                                      ComPtr<IStorageController> &aController)
+{
     if (   (aConnectionType <= StorageBus_Null)
         || (aConnectionType >  StorageBus_USB))
@@ -6468,10 +5781,7 @@
                         aConnectionType);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -6479,9 +5789,9 @@
     ComObjPtr<StorageController> ctrl;
 
-    rc = getStorageControllerByName(aName, ctrl, false /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctrl, false /* aSetError */);
     if (SUCCEEDED(rc))
         return setError(VBOX_E_OBJECT_IN_USE,
-                        tr("Storage controller named '%ls' already exists"),
-                        aName);
+                        tr("Storage controller named '%s' already exists"),
+                        aName.c_str());
 
     ctrl.createObject();
@@ -6510,42 +5820,34 @@
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_Storage);
+    i_setModified(IsModified_Storage);
     mStorageControllers.backup();
     mStorageControllers->push_back(ctrl);
 
-    ctrl.queryInterfaceTo(controller);
+    ctrl.queryInterfaceTo(aController.asOutParam());
 
     /* inform the direct session if any */
     alock.release();
-    onStorageControllerChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetStorageControllerByName(IN_BSTR aName,
-                                                 IStorageController **aStorageController)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    i_onStorageControllerChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::getStorageControllerByName(const com::Utf8Str &aName,
+                                            ComPtr<IStorageController> &aStorageController)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     ComObjPtr<StorageController> ctrl;
 
-    HRESULT rc = getStorageControllerByName(aName, ctrl, true /* aSetError */);
+    HRESULT rc = i_getStorageControllerByName(aName, ctrl, true /* aSetError */);
     if (SUCCEEDED(rc))
-        ctrl.queryInterfaceTo(aStorageController);
+        ctrl.queryInterfaceTo(aStorageController.asOutParam());
 
     return rc;
 }
 
-STDMETHODIMP Machine::GetStorageControllerByInstance(ULONG aInstance,
-                                                     IStorageController **aStorageController)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getStorageControllerByInstance(ULONG aInstance,
+                                                ComPtr<IStorageController> &aStorageController)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -6556,5 +5858,5 @@
         if ((*it)->i_getInstance() == aInstance)
         {
-            (*it).queryInterfaceTo(aStorageController);
+            (*it).queryInterfaceTo(aStorageController.asOutParam());
             return S_OK;
         }
@@ -6566,21 +5868,18 @@
 }
 
-STDMETHODIMP Machine::SetStorageControllerBootable(IN_BSTR aName, BOOL fBootable)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::setStorageControllerBootable(const com::Utf8Str &aName, BOOL aBootable)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     ComObjPtr<StorageController> ctrl;
 
-    rc = getStorageControllerByName(aName, ctrl, true /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctrl, true /* aSetError */);
     if (SUCCEEDED(rc))
     {
         /* Ensure that only one controller of each type is marked as bootable. */
-        if (fBootable == TRUE)
+        if (aBootable == TRUE)
         {
             for (StorageControllerList::const_iterator it = mStorageControllers->begin();
@@ -6590,5 +5889,5 @@
                 ComObjPtr<StorageController> aCtrl = (*it);
 
-                if (   (aCtrl->i_getName() != Utf8Str(aName))
+                if (   (aCtrl->i_getName() != aName)
                     && aCtrl->i_getBootable() == TRUE
                     && aCtrl->i_getStorageBus() == ctrl->i_getStorageBus()
@@ -6603,6 +5902,6 @@
         if (SUCCEEDED(rc))
         {
-            ctrl->i_setBootable(fBootable);
-            setModified(IsModified_Storage);
+            ctrl->i_setBootable(aBootable);
+            i_setModified(IsModified_Storage);
         }
     }
@@ -6612,5 +5911,5 @@
         /* inform the direct session if any */
         alock.release();
-        onStorageControllerChange();
+        i_onStorageControllerChange();
     }
 
@@ -6618,18 +5917,13 @@
 }
 
-STDMETHODIMP Machine::RemoveStorageController(IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::removeStorageController(const com::Utf8Str &aName)
+{
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     ComObjPtr<StorageController> ctrl;
-    rc = getStorageControllerByName(aName, ctrl, true /* aSetError */);
+    rc = i_getStorageControllerByName(aName, ctrl, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
@@ -6653,5 +5947,5 @@
             if (pAttachTemp->i_getControllerName() == aName)
             {
-                rc = detachDevice(pAttachTemp, alock, NULL);
+                rc = i_detachDevice(pAttachTemp, alock, NULL);
                 if (FAILED(rc)) return rc;
             }
@@ -6660,5 +5954,5 @@
 
     /* We can remove it now. */
-    setModified(IsModified_Storage);
+    i_setModified(IsModified_Storage);
     mStorageControllers.backup();
 
@@ -6669,11 +5963,11 @@
     /* inform the direct session if any */
     alock.release();
-    onStorageControllerChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::AddUSBController(IN_BSTR aName, USBControllerType_T aType,
-                                       IUSBController **controller)
+    i_onStorageControllerChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::addUSBController(const com::Utf8Str &aName, USBControllerType_T aType,
+                                  ComPtr<IUSBController> &aController)
 {
     if (   (aType <= USBControllerType_Null)
@@ -6683,10 +5977,7 @@
                         aType);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
@@ -6694,9 +5985,9 @@
     ComObjPtr<USBController> ctrl;
 
-    rc = getUSBControllerByName(aName, ctrl, false /* aSetError */);
+    rc = i_getUSBControllerByName(aName, ctrl, false /* aSetError */);
     if (SUCCEEDED(rc))
         return setError(VBOX_E_OBJECT_IN_USE,
-                        tr("USB controller named '%ls' already exists"),
-                        aName);
+                        tr("USB controller named '%s' already exists"),
+                        aName.c_str());
 
     /* Check that we don't exceed the maximum number of USB controllers for the given type. */
@@ -6706,5 +5997,5 @@
         return rc;
 
-    ULONG cInstances = getUSBControllerCountByType(aType);
+    ULONG cInstances = i_getUSBControllerCountByType(aType);
     if (cInstances >= maxInstances)
         return setError(E_INVALIDARG,
@@ -6716,40 +6007,33 @@
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_USB);
+    i_setModified(IsModified_USB);
     mUSBControllers.backup();
     mUSBControllers->push_back(ctrl);
 
-    ctrl.queryInterfaceTo(controller);
+    ctrl.queryInterfaceTo(aController.asOutParam());
 
     /* inform the direct session if any */
     alock.release();
-    onUSBControllerChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetUSBControllerByName(IN_BSTR aName, IUSBController **aUSBController)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+    i_onUSBControllerChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::getUSBControllerByName(const com::Utf8Str &aName, ComPtr<IUSBController> &aController)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     ComObjPtr<USBController> ctrl;
 
-    HRESULT rc = getUSBControllerByName(aName, ctrl, true /* aSetError */);
+    HRESULT rc = i_getUSBControllerByName(aName, ctrl, true /* aSetError */);
     if (SUCCEEDED(rc))
-        ctrl.queryInterfaceTo(aUSBController);
+        ctrl.queryInterfaceTo(aController.asOutParam());
 
     return rc;
 }
 
-STDMETHODIMP Machine::GetUSBControllerCountByType(USBControllerType_T aType,
-                                                  ULONG *aControllers)
-{
-    CheckComArgOutPointerValid(aControllers);
-
+HRESULT Machine::getUSBControllerCountByType(USBControllerType_T aType,
+                                             ULONG *aControllers)
+{
     if (   (aType <= USBControllerType_Null)
         || (aType >= USBControllerType_Last))
@@ -6758,33 +6042,26 @@
                         aType);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     ComObjPtr<USBController> ctrl;
 
-    *aControllers = getUSBControllerCountByType(aType);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::RemoveUSBController(IN_BSTR aName)
-{
-    CheckComArgStrNotEmptyOrNull(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+    *aControllers = i_getUSBControllerCountByType(aType);
+
+    return S_OK;
+}
+
+HRESULT Machine::removeUSBController(const com::Utf8Str &aName)
+{
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(MutableStateDep);
+    HRESULT rc = i_checkStateDependency(MutableStateDep);
     if (FAILED(rc)) return rc;
 
     ComObjPtr<USBController> ctrl;
-    rc = getUSBControllerByName(aName, ctrl, true /* aSetError */);
+    rc = i_getUSBControllerByName(aName, ctrl, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_USB);
+    i_setModified(IsModified_USB);
     mUSBControllers.backup();
 
@@ -6795,24 +6072,16 @@
     /* inform the direct session if any */
     alock.release();
-    onUSBControllerChange();
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::QuerySavedGuestScreenInfo(ULONG uScreenId,
-                                                ULONG *puOriginX,
-                                                ULONG *puOriginY,
-                                                ULONG *puWidth,
-                                                ULONG *puHeight,
-                                                BOOL *pfEnabled)
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(puOriginX);
-    CheckComArgNotNull(puOriginY);
-    CheckComArgNotNull(puWidth);
-    CheckComArgNotNull(puHeight);
-    CheckComArgNotNull(pfEnabled);
-
+    i_onUSBControllerChange();
+
+    return S_OK;
+}
+
+HRESULT Machine::querySavedGuestScreenInfo(ULONG aScreenId,
+                                           ULONG *aOriginX,
+                                           ULONG *aOriginY,
+                                           ULONG *aWidth,
+                                           ULONG *aHeight,
+                                           BOOL  *aEnabled)
+{
     uint32_t u32OriginX= 0;
     uint32_t u32OriginY= 0;
@@ -6821,5 +6090,5 @@
     uint16_t u16Flags = 0;
 
-    int vrc = readSavedGuestScreenInfo(mSSData->strStateFilePath, uScreenId,
+    int vrc = readSavedGuestScreenInfo(mSSData->strStateFilePath, aScreenId,
                                        &u32OriginX, &u32OriginY, &u32Width, &u32Height, &u16Flags);
     if (RT_FAILURE(vrc))
@@ -6832,5 +6101,5 @@
          * are changed only if API succeeds.
          */
-        *pfEnabled = TRUE;
+        *aEnabled = TRUE;
 #endif
         return setError(VBOX_E_IPRT_ERROR,
@@ -6839,26 +6108,17 @@
     }
 
-    *puOriginX = u32OriginX;
-    *puOriginY = u32OriginY;
-    *puWidth = u32Width;
-    *puHeight = u32Height;
-    *pfEnabled = (u16Flags & VBVA_SCREEN_F_DISABLED) == 0;
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::QuerySavedThumbnailSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aSize);
-    CheckComArgNotNull(aWidth);
-    CheckComArgNotNull(aHeight);
-
+    *aOriginX = u32OriginX;
+    *aOriginY = u32OriginY;
+    *aWidth = u32Width;
+    *aHeight = u32Height;
+    *aEnabled = (u16Flags & VBVA_SCREEN_F_DISABLED) == 0;
+
+    return S_OK;
+}
+
+HRESULT Machine::querySavedThumbnailSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
+{
     if (aScreenId != 0)
         return E_NOTIMPL;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -6885,17 +6145,9 @@
 }
 
-STDMETHODIMP Machine::ReadSavedThumbnailToArray(ULONG aScreenId, BOOL aBGR, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData))
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aWidth);
-    CheckComArgNotNull(aHeight);
-    CheckComArgOutSafeArrayPointerValid(aData);
-
+
+HRESULT Machine::readSavedThumbnailToArray(ULONG aScreenId, BOOL aBGR, ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData)
+{
     if (aScreenId != 0)
         return E_NOTIMPL;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -6940,5 +6192,7 @@
         }
     }
-    bitmap.detachTo(ComSafeArrayOutArg(aData));
+    aData.resize(bitmap.size());
+    for (size_t i = 0; i < bitmap.size(); ++i)
+        aData[i] = bitmap[i];
 
     freeSavedDisplayScreenshot(pu8Data);
@@ -6947,18 +6201,8 @@
 }
 
-
-STDMETHODIMP Machine::ReadSavedThumbnailPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData))
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aWidth);
-    CheckComArgNotNull(aHeight);
-    CheckComArgOutSafeArrayPointerValid(aData);
-
+HRESULT Machine::readSavedThumbnailPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData)
+{
     if (aScreenId != 0)
         return E_NOTIMPL;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -6993,5 +6237,7 @@
         if (pu8PNG)
             RTMemFree(pu8PNG);
-        screenData.detachTo(ComSafeArrayOutArg(aData));
+        aData.resize(screenData.size());
+        for (size_t i = 0; i < screenData.size(); ++i)
+            aData[i] = screenData[i];
     }
     else
@@ -7009,17 +6255,8 @@
 }
 
-STDMETHODIMP Machine::QuerySavedScreenshotPNGSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aSize);
-    CheckComArgNotNull(aWidth);
-    CheckComArgNotNull(aHeight);
-
+HRESULT Machine::querySavedScreenshotPNGSize(ULONG aScreenId, ULONG *aSize, ULONG *aWidth, ULONG *aHeight)
+{
     if (aScreenId != 0)
         return E_NOTIMPL;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -7046,17 +6283,8 @@
 }
 
-STDMETHODIMP Machine::ReadSavedScreenshotPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, ComSafeArrayOut(BYTE, aData))
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aWidth);
-    CheckComArgNotNull(aHeight);
-    CheckComArgOutSafeArrayPointerValid(aData);
-
+HRESULT Machine::readSavedScreenshotPNGToArray(ULONG aScreenId, ULONG *aWidth, ULONG *aHeight, std::vector<BYTE> &aData)
+{
     if (aScreenId != 0)
         return E_NOTIMPL;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -7079,5 +6307,7 @@
     com::SafeArray<BYTE> png(cbData);
     png.initFrom(pu8Data, cbData);
-    png.detachTo(ComSafeArrayOutArg(aData));
+    aData.resize(png.size());
+    for (size_t i = 0; i < png.size(); ++i)
+        aData[i] = png[i];
 
     freeSavedDisplayScreenshot(pu8Data);
@@ -7086,12 +6316,7 @@
 }
 
-STDMETHODIMP Machine::HotPlugCPU(ULONG aCpu)
+HRESULT Machine::hotPlugCPU(ULONG aCpu)
 {
     HRESULT rc = S_OK;
-    LogFlowThisFunc(("\n"));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
@@ -7106,9 +6331,9 @@
 
     alock.release();
-    rc = onCPUChange(aCpu, false);
+    rc = i_onCPUChange(aCpu, false);
     alock.acquire();
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mCPUAttached[aCpu] = true;
@@ -7116,16 +6341,12 @@
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::HotUnplugCPU(ULONG aCpu)
+        i_saveSettings(NULL);
+
+    return S_OK;
+}
+
+HRESULT Machine::hotUnplugCPU(ULONG aCpu)
 {
     HRESULT rc = S_OK;
-    LogFlowThisFunc(("\n"));
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -7147,9 +6368,9 @@
 
     alock.release();
-    rc = onCPUChange(aCpu, true);
+    rc = i_onCPUChange(aCpu, true);
     alock.acquire();
     if (FAILED(rc)) return rc;
 
-    setModified(IsModified_MachineData);
+    i_setModified(IsModified_MachineData);
     mHWData.backup();
     mHWData->mCPUAttached[aCpu] = false;
@@ -7157,19 +6378,12 @@
     /** Save settings if online - @todo why is this required? -- @bugref{6818} */
     if (Global::IsOnline(mData->mMachineState))
-        saveSettings(NULL);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::GetCPUStatus(ULONG aCpu, BOOL *aCpuAttached)
-{
-    LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aCpuAttached);
-
-    *aCpuAttached = false;
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+        i_saveSettings(NULL);
+
+    return S_OK;
+}
+
+HRESULT Machine::getCPUStatus(ULONG aCpu, BOOL *aAttached)
+{
+    *aAttached = false;
 
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -7179,46 +6393,36 @@
     {
         if (aCpu < mHWData->mCPUCount)
-            *aCpuAttached = true;
+            *aAttached = true;
     }
     else
     {
         if (aCpu < SchemaDefs::MaxCPUCount)
-            *aCpuAttached = mHWData->mCPUAttached[aCpu];
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::QueryLogFilename(ULONG aIdx, BSTR *aName)
-{
-    CheckComArgOutPointerValid(aName);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+            *aAttached = mHWData->mCPUAttached[aCpu];
+    }
+
+    return S_OK;
+}
+
+HRESULT Machine::queryLogFilename(ULONG aIdx, com::Utf8Str &aFilename)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    Utf8Str log = queryLogFilename(aIdx);
+    Utf8Str log = i_queryLogFilename(aIdx);
     if (!RTFileExists(log.c_str()))
         log.setNull();
-    log.cloneTo(aName);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::ReadLog(ULONG aIdx, LONG64 aOffset, LONG64 aSize, ComSafeArrayOut(BYTE, aData))
-{
-    LogFlowThisFunc(("\n"));
-    CheckComArgOutSafeArrayPointerValid(aData);
+    aFilename = log;
+
+    return S_OK;
+}
+
+HRESULT Machine::readLog(ULONG aIdx, LONG64 aOffset, LONG64 aSize, std::vector<BYTE> &aData)
+{
     if (aSize < 0)
         return setError(E_INVALIDARG, tr("The size argument (%lld) is negative"), aSize);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     HRESULT rc = S_OK;
-    Utf8Str log = queryLogFilename(aIdx);
+    Utf8Str log = i_queryLogFilename(aIdx);
 
     /* do not unnecessarily hold the lock while doing something which does
@@ -7253,5 +6457,8 @@
     if (FAILED(rc))
         logData.resize(0);
-    logData.detachTo(ComSafeArrayOutArg(aData));
+
+    aData.resize(logData.size());
+    for (size_t i = 0; i < logData.size(); ++i)
+        aData[i] = logData[i];
 
     return rc;
@@ -7263,14 +6470,11 @@
  * just makes sure it's plugged on next VM start.
  */
-STDMETHODIMP Machine::AttachHostPCIDevice(LONG hostAddress, LONG desiredGuestAddress, BOOL /*tryToUnbind*/)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::attachHostPCIDevice(LONG aHostAddress, LONG aDesiredGuestAddress, BOOL /* aTryToUnbind */)
+{
     // lock scope
     {
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-        HRESULT rc = checkStateDependency(MutableStateDep);
+        HRESULT rc = i_checkStateDependency(MutableStateDep);
         if (FAILED(rc)) return rc;
 
@@ -7293,5 +6497,5 @@
             pAttach = *it;
             pAttach->COMGETTER(HostAddress)(&iHostAddress);
-            if (iHostAddress == hostAddress)
+            if (iHostAddress == aHostAddress)
                 return setError(E_INVALIDARG,
                                 tr("Device with host PCI address already attached to this VM"));
@@ -7301,9 +6505,10 @@
         char name[32];
 
-        RTStrPrintf(name, sizeof(name), "host%02x:%02x.%x", (hostAddress>>8) & 0xff, (hostAddress & 0xf8) >> 3, hostAddress & 7);
+        RTStrPrintf(name, sizeof(name), "host%02x:%02x.%x", (aHostAddress>>8) & 0xff,
+                    (aHostAddress & 0xf8) >> 3, aHostAddress & 7);
         Bstr bname(name);
         pda.createObject();
-        pda->init(this, bname,  hostAddress, desiredGuestAddress, TRUE);
-        setModified(IsModified_MachineData);
+        pda->init(this, bname,  aHostAddress, aDesiredGuestAddress, TRUE);
+        i_setModified(IsModified_MachineData);
         mHWData.backup();
         mHWData->mPCIDeviceAssignments.push_back(pda);
@@ -7317,9 +6522,6 @@
  * just makes sure it's not plugged on next VM start.
  */
-STDMETHODIMP Machine::DetachHostPCIDevice(LONG hostAddress)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::detachHostPCIDevice(LONG aHostAddress)
+{
     ComObjPtr<PCIDeviceAttachment> pAttach;
     bool fRemoved = false;
@@ -7330,5 +6532,5 @@
         AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-        rc = checkStateDependency(MutableStateDep);
+        rc = i_checkStateDependency(MutableStateDep);
         if (FAILED(rc)) return rc;
 
@@ -7340,7 +6542,7 @@
             pAttach = *it;
             pAttach->COMGETTER(HostAddress)(&iHostAddress);
-            if (iHostAddress  != -1  && iHostAddress == hostAddress)
+            if (iHostAddress  != -1  && iHostAddress == aHostAddress)
             {
-                setModified(IsModified_MachineData);
+                i_setModified(IsModified_MachineData);
                 mHWData.backup();
                 mHWData->mPCIDeviceAssignments.remove(pAttach);
@@ -7367,393 +6569,307 @@
     return fRemoved ? S_OK : setError(VBOX_E_OBJECT_NOT_FOUND,
                                       tr("No host PCI device %08x attached"),
-                                      hostAddress
+                                      aHostAddress
                                       );
 }
 
-STDMETHODIMP Machine::COMGETTER(PCIDeviceAssignments)(ComSafeArrayOut(IPCIDeviceAttachment *, aAssignments))
-{
-    CheckComArgOutSafeArrayPointerValid(aAssignments);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
+HRESULT Machine::getPCIDeviceAssignments(std::vector<ComPtr<IPCIDeviceAttachment> > &aPCIDeviceAssignments)
+{
     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
 
     SafeIfaceArray<IPCIDeviceAttachment> assignments(mHWData->mPCIDeviceAssignments);
-    assignments.detachTo(ComSafeArrayOutArg(aAssignments));
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(BandwidthControl)(IBandwidthControl **aBandwidthControl)
-{
-    CheckComArgOutPointerValid(aBandwidthControl);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    mBandwidthControl.queryInterfaceTo(aBandwidthControl);
-
-    return S_OK;
-}
-
-STDMETHODIMP Machine::COMGETTER(TracingEnabled)(BOOL *pfEnabled)
-{
-    CheckComArgOutPointerValid(pfEnabled);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+    aPCIDeviceAssignments.resize(assignments.size());
+    for (size_t i = 0; i < assignments.size(); ++i)
+        aPCIDeviceAssignments[i] = assignments[i];
+    return S_OK;
+}
+
+HRESULT Machine::getBandwidthControl(ComPtr<IBandwidthControl> &aBandwidthControl)
+{
+    mBandwidthControl.queryInterfaceTo(aBandwidthControl.asOutParam());
+
+    return S_OK;
+}
+
+HRESULT Machine::getTracingEnabled(BOOL *aTracingEnabled)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aTracingEnabled = mHWData->mDebugging.fTracingEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setTracingEnabled(BOOL aTracingEnabled)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *pfEnabled = mHWData->mDebugging.fTracingEnabled;
+        hrc = mHWData.backupEx();
+        if (SUCCEEDED(hrc))
+        {
+            i_setModified(IsModified_MachineData);
+            mHWData->mDebugging.fTracingEnabled = aTracingEnabled != FALSE;
+        }
     }
     return hrc;
 }
 
-STDMETHODIMP Machine::COMSETTER(TracingEnabled)(BOOL fEnabled)
-{
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+HRESULT Machine::getTracingConfig(com::Utf8Str &aTracingConfig)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    aTracingConfig = mHWData->mDebugging.strTracingConfig;
+    return S_OK;
+}
+
+HRESULT Machine::setTracingConfig(const com::Utf8Str &aTracingConfig)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
+        hrc = mHWData.backupEx();
         if (SUCCEEDED(hrc))
+        {
+            mHWData->mDebugging.strTracingConfig = aTracingConfig;
+            if (SUCCEEDED(hrc))
+                i_setModified(IsModified_MachineData);
+        }
+    }
+    return hrc;
+}
+
+HRESULT Machine::getAllowTracingToAccessVM(BOOL *aAllowTracingToAccessVM)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aAllowTracingToAccessVM = mHWData->mDebugging.fAllowTracingToAccessVM;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAllowTracingToAccessVM(BOOL aAllowTracingToAccessVM)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
+    if (SUCCEEDED(hrc))
+    {
+        hrc = mHWData.backupEx();
+        if (SUCCEEDED(hrc))
+        {
+            i_setModified(IsModified_MachineData);
+            mHWData->mDebugging.fAllowTracingToAccessVM = aAllowTracingToAccessVM != FALSE;
+        }
+    }
+    return hrc;
+}
+
+HRESULT Machine::getAutostartEnabled(BOOL *aAutostartEnabled)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aAutostartEnabled = mHWData->mAutostart.fAutostartEnabled;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAutostartEnabled(BOOL aAutostartEnabled)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
+    if (   SUCCEEDED(hrc)
+        && mHWData->mAutostart.fAutostartEnabled != !!aAutostartEnabled)
+    {
+        AutostartDb *autostartDb = mParent->i_getAutostartDb();
+        int vrc;
+
+        if (aAutostartEnabled)
+            vrc = autostartDb->addAutostartVM(mUserData->s.strName.c_str());
+        else
+            vrc = autostartDb->removeAutostartVM(mUserData->s.strName.c_str());
+
+        if (RT_SUCCESS(vrc))
         {
             hrc = mHWData.backupEx();
             if (SUCCEEDED(hrc))
             {
-                setModified(IsModified_MachineData);
-                mHWData->mDebugging.fTracingEnabled = fEnabled != FALSE;
+                i_setModified(IsModified_MachineData);
+                mHWData->mAutostart.fAutostartEnabled = aAutostartEnabled != FALSE;
             }
         }
+        else if (vrc == VERR_NOT_SUPPORTED)
+            hrc = setError(VBOX_E_NOT_SUPPORTED,
+                           tr("The VM autostart feature is not supported on this platform"));
+        else if (vrc == VERR_PATH_NOT_FOUND)
+            hrc = setError(E_FAIL,
+                           tr("The path to the autostart database is not set"));
+        else
+            hrc = setError(E_UNEXPECTED,
+                           tr("%s machine '%s' to the autostart database failed with %Rrc"),
+                           aAutostartEnabled ? "Adding" : "Removing",
+                           mUserData->s.strName.c_str(), vrc);
     }
     return hrc;
 }
 
-STDMETHODIMP Machine::COMGETTER(TracingConfig)(BSTR *pbstrConfig)
-{
-    CheckComArgOutPointerValid(pbstrConfig);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+HRESULT Machine::getAutostartDelay(ULONG *aAutostartDelay)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aAutostartDelay = mHWData->mAutostart.uAutostartDelay;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAutostartDelay(ULONG aAutostartDelay)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = mHWData->mDebugging.strTracingConfig.cloneToEx(pbstrConfig);
+        hrc = mHWData.backupEx();
+        if (SUCCEEDED(hrc))
+        {
+            i_setModified(IsModified_MachineData);
+            mHWData->mAutostart.uAutostartDelay = aAutostartDelay;
+        }
     }
     return hrc;
 }
 
-STDMETHODIMP Machine::COMSETTER(TracingConfig)(IN_BSTR bstrConfig)
-{
-    CheckComArgStr(bstrConfig);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+HRESULT Machine::getAutostopType(AutostopType_T *aAutostopType)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    *aAutostopType = mHWData->mAutostart.enmAutostopType;
+
+    return S_OK;
+}
+
+HRESULT Machine::setAutostopType(AutostopType_T aAutostopType)
+{
+   AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+   HRESULT hrc = i_checkStateDependency(MutableStateDep);
+   if (   SUCCEEDED(hrc)
+       && mHWData->mAutostart.enmAutostopType != aAutostopType)
+   {
+       AutostartDb *autostartDb = mParent->i_getAutostartDb();
+       int vrc;
+
+       if (aAutostopType != AutostopType_Disabled)
+           vrc = autostartDb->addAutostopVM(mUserData->s.strName.c_str());
+       else
+           vrc = autostartDb->removeAutostopVM(mUserData->s.strName.c_str());
+
+       if (RT_SUCCESS(vrc))
+       {
+           hrc = mHWData.backupEx();
+           if (SUCCEEDED(hrc))
+           {
+               i_setModified(IsModified_MachineData);
+               mHWData->mAutostart.enmAutostopType = aAutostopType;
+           }
+       }
+       else if (vrc == VERR_NOT_SUPPORTED)
+           hrc = setError(VBOX_E_NOT_SUPPORTED,
+                          tr("The VM autostop feature is not supported on this platform"));
+       else if (vrc == VERR_PATH_NOT_FOUND)
+           hrc = setError(E_FAIL,
+                          tr("The path to the autostart database is not set"));
+       else
+           hrc = setError(E_UNEXPECTED,
+                          tr("%s machine '%s' to the autostop database failed with %Rrc"),
+                          aAutostopType != AutostopType_Disabled ? "Adding" : "Removing",
+                          mUserData->s.strName.c_str(), vrc);
+    }
+    return hrc;
+}
+
+HRESULT Machine::getDefaultFrontend(com::Utf8Str &aDefaultFrontend)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aDefaultFrontend = mHWData->mDefaultFrontend;
+
+    return S_OK;
+}
+
+HRESULT Machine::setDefaultFrontend(const com::Utf8Str &aDefaultFrontend)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableOrSavedStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
+        hrc = mHWData.backupEx();
         if (SUCCEEDED(hrc))
         {
-            hrc = mHWData.backupEx();
-            if (SUCCEEDED(hrc))
-            {
-                hrc = mHWData->mDebugging.strTracingConfig.cloneEx(bstrConfig);
-                if (SUCCEEDED(hrc))
-                    setModified(IsModified_MachineData);
-            }
+            i_setModified(IsModified_MachineData);
+            mHWData->mDefaultFrontend = aDefaultFrontend;
         }
     }
     return hrc;
-
-}
-
-STDMETHODIMP Machine::COMGETTER(AllowTracingToAccessVM)(BOOL *pfAllow)
-{
-    CheckComArgOutPointerValid(pfAllow);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
+}
+
+HRESULT Machine::getIcon(std::vector<BYTE> &aIcon)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+    com::SafeArray<BYTE> icon(mUserData->mIcon.size());
+    aIcon.resize(mUserData->mIcon.size());
+    memcpy(icon.raw(), &mUserData->mIcon[0], mUserData->mIcon.size());
+    aIcon.resize(icon.size());
+    for (size_t i = 0; i < icon.size(); ++i)
+        aIcon[i] = icon[i];
+    return S_OK;
+}
+
+HRESULT Machine::setIcon(const std::vector<BYTE> &aIcon)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+    HRESULT hrc = i_checkStateDependency(MutableOrSavedStateDep);
     if (SUCCEEDED(hrc))
     {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *pfAllow = mHWData->mDebugging.fAllowTracingToAccessVM;
+        i_setModified(IsModified_MachineData);
+        mUserData.backup();
+        com::SafeArray<BYTE> icon(aIcon);
+        mUserData->mIcon.resize(aIcon.size());
+        memcpy(&mUserData->mIcon[0], icon.raw(), mUserData->mIcon.size());
     }
     return hrc;
 }
 
-STDMETHODIMP Machine::COMSETTER(AllowTracingToAccessVM)(BOOL fAllow)
-{
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
-        if (SUCCEEDED(hrc))
-        {
-            hrc = mHWData.backupEx();
-            if (SUCCEEDED(hrc))
-            {
-                setModified(IsModified_MachineData);
-                mHWData->mDebugging.fAllowTracingToAccessVM = fAllow != FALSE;
-            }
-        }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(AutostartEnabled)(BOOL *pfEnabled)
-{
-    CheckComArgOutPointerValid(pfEnabled);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *pfEnabled = mHWData->mAutostart.fAutostartEnabled;
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(AutostartEnabled)(BOOL fEnabled)
-{
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
-        if (   SUCCEEDED(hrc)
-            && mHWData->mAutostart.fAutostartEnabled != !!fEnabled)
-        {
-            AutostartDb *autostartDb = mParent->i_getAutostartDb();
-            int vrc;
-
-            if (fEnabled)
-                vrc = autostartDb->addAutostartVM(mUserData->s.strName.c_str());
-            else
-                vrc = autostartDb->removeAutostartVM(mUserData->s.strName.c_str());
-
-            if (RT_SUCCESS(vrc))
-            {
-                hrc = mHWData.backupEx();
-                if (SUCCEEDED(hrc))
-                {
-                    setModified(IsModified_MachineData);
-                    mHWData->mAutostart.fAutostartEnabled = fEnabled != FALSE;
-                }
-            }
-            else if (vrc == VERR_NOT_SUPPORTED)
-                hrc = setError(VBOX_E_NOT_SUPPORTED,
-                               tr("The VM autostart feature is not supported on this platform"));
-            else if (vrc == VERR_PATH_NOT_FOUND)
-                hrc = setError(E_FAIL,
-                               tr("The path to the autostart database is not set"));
-            else
-                hrc = setError(E_UNEXPECTED,
-                               tr("%s machine '%s' to the autostart database failed with %Rrc"),
-                               fEnabled ? "Adding" : "Removing",
-                               mUserData->s.strName.c_str(), vrc);
-        }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(AutostartDelay)(ULONG *puDelay)
-{
-    CheckComArgOutPointerValid(puDelay);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *puDelay = mHWData->mAutostart.uAutostartDelay;
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(AutostartDelay)(ULONG uDelay)
-{
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
-        if (SUCCEEDED(hrc))
-        {
-            hrc = mHWData.backupEx();
-            if (SUCCEEDED(hrc))
-            {
-                setModified(IsModified_MachineData);
-                mHWData->mAutostart.uAutostartDelay = uDelay;
-            }
-        }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(AutostopType)(AutostopType_T *penmAutostopType)
-{
-    CheckComArgOutPointerValid(penmAutostopType);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        *penmAutostopType = mHWData->mAutostart.enmAutostopType;
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(AutostopType)(AutostopType_T enmAutostopType)
-{
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableStateDep);
-        if (   SUCCEEDED(hrc)
-            && mHWData->mAutostart.enmAutostopType != enmAutostopType)
-        {
-            AutostartDb *autostartDb = mParent->i_getAutostartDb();
-            int vrc;
-
-            if (enmAutostopType != AutostopType_Disabled)
-                vrc = autostartDb->addAutostopVM(mUserData->s.strName.c_str());
-            else
-                vrc = autostartDb->removeAutostopVM(mUserData->s.strName.c_str());
-
-            if (RT_SUCCESS(vrc))
-            {
-                hrc = mHWData.backupEx();
-                if (SUCCEEDED(hrc))
-                {
-                    setModified(IsModified_MachineData);
-                    mHWData->mAutostart.enmAutostopType = enmAutostopType;
-                }
-            }
-            else if (vrc == VERR_NOT_SUPPORTED)
-                hrc = setError(VBOX_E_NOT_SUPPORTED,
-                               tr("The VM autostop feature is not supported on this platform"));
-            else if (vrc == VERR_PATH_NOT_FOUND)
-                hrc = setError(E_FAIL,
-                               tr("The path to the autostart database is not set"));
-            else
-                hrc = setError(E_UNEXPECTED,
-                               tr("%s machine '%s' to the autostop database failed with %Rrc"),
-                               enmAutostopType != AutostopType_Disabled ? "Adding" : "Removing",
-                               mUserData->s.strName.c_str(), vrc);
-        }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(DefaultFrontend)(BSTR *aDefaultFrontend)
-{
-    CheckComArgOutPointerValid(aDefaultFrontend);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        mHWData->mDefaultFrontend.cloneTo(aDefaultFrontend);
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(DefaultFrontend)(IN_BSTR aDefaultFrontend)
-{
-    CheckComArgStr(aDefaultFrontend);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableOrSavedStateDep);
-        if (SUCCEEDED(hrc))
-        {
-            hrc = mHWData.backupEx();
-            if (SUCCEEDED(hrc))
-            {
-                setModified(IsModified_MachineData);
-                mHWData->mDefaultFrontend = aDefaultFrontend;
-            }
-        }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(Icon)(ComSafeArrayOut(BYTE, aIcon))
-{
-    CheckComArgSafeArrayNotNull(aIcon);
-    CheckComArgOutSafeArrayPointerValid(aIcon);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        com::SafeArray<BYTE> icon(mUserData->mIcon.size());
-        memcpy(icon.raw(), &mUserData->mIcon[0], mUserData->mIcon.size());
-        icon.detachTo(ComSafeArrayOutArg(aIcon));
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMSETTER(Icon)(ComSafeArrayIn(BYTE, aIcon))
-{
-    CheckComArgSafeArrayNotNull(aIcon);
-    AutoCaller autoCaller(this);
-    HRESULT hrc = autoCaller.rc();
-    if (SUCCEEDED(hrc))
-    {
-        AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-        hrc = checkStateDependency(MutableOrSavedStateDep);
-        if (SUCCEEDED(hrc))
-        {
-            setModified(IsModified_MachineData);
-            mUserData.backup();
-            com::SafeArray<BYTE> icon(ComSafeArrayInArg(aIcon));
-            mUserData->mIcon.resize(icon.size());
-            memcpy(&mUserData->mIcon[0], icon.raw(), mUserData->mIcon.size());
-         }
-    }
-    return hrc;
-}
-
-STDMETHODIMP Machine::COMGETTER(USBProxyAvailable)(BOOL *aAvailable)
-{
-    CheckComArgOutPointerValid(aAvailable);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
+HRESULT Machine::getUSBProxyAvailable(BOOL *aUSBProxyAvailable)
+{
 
 #ifdef VBOX_WITH_USB
-    *aAvailable = true;
+    *aUSBProxyAvailable = true;
 #else
-    *aAvailable = false;
+    *aUSBProxyAvailable = false;
 #endif
     return S_OK;
 }
 
-STDMETHODIMP Machine::CloneTo(IMachine *pTarget, CloneMode_T mode, ComSafeArrayIn(CloneOptions_T, options), IProgress **pProgress)
-{
-    LogFlowFuncEnter();
-
-    CheckComArgNotNull(pTarget);
-    CheckComArgOutPointerValid(pProgress);
+HRESULT Machine::cloneTo(const ComPtr<IMachine> &aTarget, CloneMode_T aMode, const std::vector<CloneOptions_T> &aOptions,
+                         ComPtr<IProgress> &aProgress)
+{
+    ComObjPtr<Progress> pP;
+    Progress  *ppP = pP;
+    IProgress *iP  = static_cast<IProgress *>(ppP);
+    IProgress **pProgress = &iP;
+
+    IMachine  *pTarget    = aTarget;
 
     /* Convert the options. */
     RTCList<CloneOptions_T> optList;
-    if (options != NULL)
-        optList = com::SafeArray<CloneOptions_T>(ComSafeArrayInArg(options)).toList();
+    if (aOptions.size())
+        for (size_t i = 0; i < aOptions.size(); ++i)
+            optList.append(aOptions[i]);
 
     if (optList.contains(CloneOptions_Link))
     {
-        if (!isSnapshotMachine())
+        if (!i_isSnapshotMachine())
             return setError(E_INVALIDARG,
                             tr("Linked clone can only be created from a snapshot"));
-        if (mode != CloneMode_MachineState)
+        if (aMode != CloneMode_MachineState)
             return setError(E_INVALIDARG,
                             tr("Linked clone can only be created for a single machine state"));
@@ -7761,15 +6877,13 @@
     AssertReturn(!(optList.contains(CloneOptions_KeepAllMACs) && optList.contains(CloneOptions_KeepNATMACs)), E_INVALIDARG);
 
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-
-    MachineCloneVM *pWorker = new MachineCloneVM(this, static_cast<Machine*>(pTarget), mode, optList);
+    MachineCloneVM *pWorker = new MachineCloneVM(this, static_cast<Machine*>(pTarget), aMode, optList);
 
     HRESULT rc = pWorker->start(pProgress);
 
-    LogFlowFuncLeave();
+    pP = static_cast<Progress *>(*pProgress);
+    pP.queryInterfaceTo(aProgress.asOutParam());
 
     return rc;
+
 }
 
@@ -7779,11 +6893,11 @@
 /**
  * Adds the given IsModified_* flag to the dirty flags of the machine.
- * This must be called either during loadSettings or under the machine write lock.
+ * This must be called either during i_loadSettings or under the machine write lock.
  * @param fl
  */
-void Machine::setModified(uint32_t fl, bool fAllowStateModification /* = true */)
+void Machine::i_setModified(uint32_t fl, bool fAllowStateModification /* = true */)
 {
     mData->flModifications |= fl;
-    if (fAllowStateModification && isStateModificationAllowed())
+    if (fAllowStateModification && i_isStateModificationAllowed())
         mData->mCurrentStateModified = true;
 }
@@ -7795,8 +6909,8 @@
  * @param   fModifications      The flag to add.
  */
-void Machine::setModifiedLock(uint32_t fModification, bool fAllowStateModification /* = true */)
+void Machine::i_setModifiedLock(uint32_t fModification, bool fAllowStateModification /* = true */)
 {
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-    setModified(fModification, fAllowStateModification);
+    i_setModified(fModification, fAllowStateModification);
 }
 
@@ -7808,5 +6922,5 @@
  *  @note locks this object for reading.
  */
-HRESULT Machine::saveRegistryEntry(settings::MachineRegistryEntry &data)
+HRESULT Machine::i_saveRegistryEntry(settings::MachineRegistryEntry &data)
 {
     AutoLimitedCaller autoCaller(this);
@@ -7832,5 +6946,5 @@
  * @note Locks this object for reading.
  */
-int Machine::calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult)
+int Machine::i_calculateFullPath(const Utf8Str &strPath, Utf8Str &aResult)
 {
     AutoCaller autoCaller(this);
@@ -7861,6 +6975,6 @@
  * @note Locks this object for reading.
  */
-void Machine::copyPathRelativeToMachine(const Utf8Str &strSource,
-                                        Utf8Str &strTarget)
+void Machine::i_copyPathRelativeToMachine(const Utf8Str &strSource,
+                                          Utf8Str &strTarget)
 {
     AutoCaller autoCaller(this);
@@ -7891,5 +7005,5 @@
  *  \a aLogFolder argument.
  */
-void Machine::getLogFolder(Utf8Str &aLogFolder)
+void Machine::i_getLogFolder(Utf8Str &aLogFolder)
 {
     AutoCaller autoCaller(this);
@@ -7929,5 +7043,5 @@
  *  Returns the full path to the machine's log file for an given index.
  */
-Utf8Str Machine::queryLogFilename(ULONG idx)
+Utf8Str Machine::i_queryLogFilename(ULONG idx)
 {
     Utf8Str logFolder;
@@ -7961,5 +7075,6 @@
  * @param str
  */
-void Machine::composeSavedStateFilename(Utf8Str &strStateFilePath)
+
+void Machine::i_composeSavedStateFilename(Utf8Str &strStateFilePath)
 {
     AutoCaller autoCaller(this);
@@ -7968,5 +7083,5 @@
     {
         AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-        calculateFullPath(mUserData->s.strSnapshotFolder, strStateFilePath);
+        i_calculateFullPath(mUserData->s.strSnapshotFolder, strStateFilePath);
     }
 
@@ -7985,5 +7100,5 @@
  *  Returns the full path to the default video capture file.
  */
-void Machine::getDefaultVideoCaptureFile(Utf8Str &strFile)
+void Machine::i_getDefaultVideoCaptureFile(Utf8Str &strFile)
 {
     AutoCaller autoCaller(this);
@@ -8000,5 +7115,5 @@
  * Returns whether at least one USB controller is present for the VM.
  */
-bool Machine::isUSBControllerPresent()
+bool Machine::i_isUSBControllerPresent()
 {
     AutoCaller autoCaller(this);
@@ -8014,8 +7129,8 @@
  *        (inside the lock).
  */
-HRESULT Machine::launchVMProcess(IInternalSessionControl *aControl,
-                                 const Utf8Str &strFrontend,
-                                 const Utf8Str &strEnvironment,
-                                 ProgressProxy *aProgress)
+HRESULT Machine::i_launchVMProcess(IInternalSessionControl *aControl,
+                                   const Utf8Str &strFrontend,
+                                   const Utf8Str &strEnvironment,
+                                   ProgressProxy *aProgress)
 {
     LogFlowThisFuncEnter();
@@ -8124,5 +7239,5 @@
 #define OSX_APP_PATH_FMT "/Resources/%s.app/Contents/MacOS/VirtualBoxVM"
 
-        Utf8Str strAppOverride = getExtraData(Utf8Str("VBoxInternal2/VirtualBoxVMAppOverride"));
+        Utf8Str strAppOverride = i_getExtraData(Utf8Str("VBoxInternal2/VirtualBoxVMAppOverride"));
         if (   strAppOverride.contains(".")
             || strAppOverride.contains("/")
@@ -8151,5 +7266,6 @@
 
         Utf8Str idStr = mData->mUuid.toString();
-        const char * args[] = {szPath, "--comment", mUserData->s.strName.c_str(), "--startvm", idStr.c_str(), "--no-startvm-errormsgbox", 0 };
+        const char * args[] = {szPath, "--comment", mUserData->s.strName.c_str(),
+                               "--startvm", idStr.c_str(), "--no-startvm-errormsgbox", 0 };
         vrc = RTProcCreate(szPath, args, env, 0, &pid);
     }
@@ -8295,7 +7411,7 @@
  * @note locks this object for reading.
  */
-bool Machine::isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
-                            ComPtr<IInternalSessionControl> *aControl /*= NULL*/,
-                            bool aAllowClosing /*= false*/)
+bool Machine::i_isSessionOpen(ComObjPtr<SessionMachine> &aMachine,
+                              ComPtr<IInternalSessionControl> *aControl /*= NULL*/,
+                              bool aAllowClosing /*= false*/)
 {
     AutoLimitedCaller autoCaller(this);
@@ -8330,5 +7446,5 @@
  * @note locks this object for reading.
  */
-bool Machine::isSessionSpawning()
+bool Machine::i_isSessionSpawning()
 {
     AutoLimitedCaller autoCaller(this);
@@ -8361,5 +7477,5 @@
  * @note Locks this object for writing.
  */
-bool Machine::checkForSpawnFailure()
+bool Machine::i_checkForSpawnFailure()
 {
     AutoCaller autoCaller(this);
@@ -8394,17 +7510,17 @@
             rc = setError(E_FAIL,
                           tr("The virtual machine '%s' has terminated unexpectedly during startup with exit code %d"),
-                          getName().c_str(), status.iStatus);
+                          i_getName().c_str(), status.iStatus);
         else if (RT_SUCCESS(vrc) && status.enmReason == RTPROCEXITREASON_SIGNAL)
             rc = setError(E_FAIL,
                           tr("The virtual machine '%s' has terminated unexpectedly during startup because of signal %d"),
-                          getName().c_str(), status.iStatus);
+                          i_getName().c_str(), status.iStatus);
         else if (RT_SUCCESS(vrc) && status.enmReason == RTPROCEXITREASON_ABEND)
             rc = setError(E_FAIL,
                           tr("The virtual machine '%s' has terminated abnormally"),
-                          getName().c_str(), status.iStatus);
+                          i_getName().c_str(), status.iStatus);
         else
             rc = setError(E_FAIL,
                           tr("The virtual machine '%s' has terminated unexpectedly during startup (%Rrc)"),
-                          getName().c_str(), vrc);
+                          i_getName().c_str(), vrc);
     }
 
@@ -8428,5 +7544,5 @@
         if (!mData->mSession.mProgress.isNull())
         {
-            mData->mSession.mProgress->i_notifyComplete(rc);
+            mData->mSession.mProgress->notifyComplete(rc);
             mData->mSession.mProgress.setNull();
         }
@@ -8448,5 +7564,5 @@
  *  children for writing.
  */
-HRESULT Machine::prepareRegister()
+HRESULT Machine::i_prepareRegister()
 {
     AssertReturn(mParent->isWriteLockOnCurrentThread(), E_FAIL);
@@ -8458,5 +7574,5 @@
 
     /* wait for state dependents to drop to zero */
-    ensureNoStateDependencies();
+    i_ensureNoStateDependencies();
 
     if (!mData->mAccessible)
@@ -8477,10 +7593,10 @@
 
     // Ensure the settings are saved. If we are going to be registered and
-    // no config file exists yet, create it by calling saveSettings() too.
+    // no config file exists yet, create it by calling i_saveSettings() too.
     if (    (mData->flModifications)
          || (!mData->pMachineConfigFile->fileExists())
        )
     {
-        rc = saveSettings(NULL);
+        rc = i_saveSettings(NULL);
                 // no need to check whether VirtualBox.xml needs saving too since
                 // we can't have a machine XML file rename pending
@@ -8493,5 +7609,5 @@
     {
         /* we may have had implicit modifications we want to fix on success */
-        commit();
+        i_commit();
 
         mData->mRegistered = true;
@@ -8500,5 +7616,5 @@
     {
         /* we may have had implicit modifications we want to cancel on failure*/
-        rollback(false /* aNotify */);
+        i_rollback(false /* aNotify */);
     }
 
@@ -8525,7 +7641,7 @@
  * @note Locks this object for writing.
  */
-HRESULT Machine::addStateDependency(StateDependency aDepType /* = AnyStateDep */,
-                                    MachineState_T *aState /* = NULL */,
-                                    BOOL *aRegistered /* = NULL */)
+HRESULT Machine::i_addStateDependency(StateDependency aDepType /* = AnyStateDep */,
+                                      MachineState_T *aState /* = NULL */,
+                                      BOOL *aRegistered /* = NULL */)
 {
     AutoCaller autoCaller(this);
@@ -8534,5 +7650,5 @@
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
 
-    HRESULT rc = checkStateDependency(aDepType);
+    HRESULT rc = i_checkStateDependency(aDepType);
     if (FAILED(rc)) return rc;
 
@@ -8540,5 +7656,5 @@
         if (mData->mMachineStateChangePending != 0)
         {
-            /* ensureNoStateDependencies() is waiting for state dependencies to
+            /* i_ensureNoStateDependencies() is waiting for state dependencies to
              * drop to zero so don't add more. It may make sense to wait a bit
              * and retry before reporting an error (since the pending state
@@ -8569,5 +7685,5 @@
  * dependency is no more necessary.
  */
-void Machine::releaseStateDependency()
+void Machine::i_releaseStateDependency()
 {
     AutoCaller autoCaller(this);
@@ -8582,5 +7698,5 @@
     if (mData->mMachineStateDeps == 0)
     {
-        /* inform ensureNoStateDependencies() that there are no more deps */
+        /* inform i_ensureNoStateDependencies() that there are no more deps */
         if (mData->mMachineStateChangePending != 0)
         {
@@ -8591,5 +7707,5 @@
 }
 
-Utf8Str Machine::getExtraData(const Utf8Str &strKey)
+Utf8Str Machine::i_getExtraData(const Utf8Str &strKey)
 {
     /* start with nothing found */
@@ -8641,5 +7757,5 @@
  *        lock.
  */
-HRESULT Machine::checkStateDependency(StateDependency aDepType)
+HRESULT Machine::i_checkStateDependency(StateDependency aDepType)
 {
     switch (aDepType)
@@ -8652,5 +7768,6 @@
         {
             if (   mData->mRegistered
-                && (   !isSessionMachine()  /** @todo This was just converted raw; Check if Running and Paused should actually be included here... (Live Migration) */
+                && (   !i_isSessionMachine()  /** @todo This was just converted raw; Check if Running and
+                                                  Paused should actually be included here... (Live Migration) */
                     || (   mData->mMachineState != MachineState_Paused
                         && mData->mMachineState != MachineState_Running
@@ -8669,5 +7786,6 @@
         {
             if (   mData->mRegistered
-                && (   !isSessionMachine() /** @todo This was just converted raw; Check if Running and Paused should actually be included here... (Live Migration) */
+                && (   !i_isSessionMachine() /** @todo This was just converted raw; Check if Running and
+                                                 Paused should actually be included here... (Live Migration) */
                     || (   mData->mMachineState != MachineState_Paused
                         && mData->mMachineState != MachineState_Running
@@ -8687,5 +7805,5 @@
         {
             if (   mData->mRegistered
-                && (   !isSessionMachine()
+                && (   !i_isSessionMachine()
                     || (   mData->mMachineState != MachineState_PoweredOff
                         && mData->mMachineState != MachineState_Saved
@@ -8743,5 +7861,5 @@
 
     /* create associated serial port objects */
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
     {
         unconst(mSerialPorts[slot]).createObject();
@@ -8750,5 +7868,5 @@
 
     /* create associated parallel port objects */
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
     {
         unconst(mParallelPorts[slot]).createObject();
@@ -8766,5 +7884,5 @@
     /* create associated network adapter objects */
     mNetworkAdapters.resize(Global::getMaxNetworkAdapters(mHWData->mChipsetType));
-    for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+    for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
     {
         unconst(mNetworkAdapters[slot]).createObject();
@@ -8802,5 +7920,5 @@
     }
 
-    for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+    for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
     {
         if (mNetworkAdapters[slot])
@@ -8823,5 +7941,5 @@
     }
 
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
     {
         if (mParallelPorts[slot])
@@ -8832,5 +7950,5 @@
     }
 
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
     {
         if (mSerialPorts[slot])
@@ -8862,5 +7980,5 @@
      * code will not affect them. */
     if (    !!mMediaData
-         && (!isSessionMachine())
+         && (!i_isSessionMachine())
        )
     {
@@ -8872,10 +7990,10 @@
             if (pMedium.isNull())
                 continue;
-            HRESULT rc = pMedium->i_removeBackReference(mData->mUuid, getSnapshotId());
+            HRESULT rc = pMedium->i_removeBackReference(mData->mUuid, i_getSnapshotId());
             AssertComRC(rc);
         }
     }
 
-    if (!isSessionMachine() && !isSnapshotMachine())
+    if (!i_isSessionMachine() && !i_isSnapshotMachine())
     {
         // clean up the snapshots list (Snapshot::uninit() will handle the snapshot's children recursively)
@@ -8911,7 +8029,7 @@
  *  (primary) machine pointer.
  */
-Machine* Machine::getMachine()
-{
-    if (isSessionMachine())
+Machine* Machine::i_getMachine()
+{
+    if (i_isSessionMachine())
         return (Machine*)mPeer;
     return this;
@@ -8931,5 +8049,5 @@
  * @warning To be used only in methods that change the machine state!
  */
-void Machine::ensureNoStateDependencies()
+void Machine::i_ensureNoStateDependencies()
 {
     AssertReturnVoid(isWriteLockOnCurrentThread());
@@ -8971,5 +8089,5 @@
  * @note Locks this object for writing.
  */
-HRESULT Machine::setMachineState(MachineState_T aMachineState)
+HRESULT Machine::i_setMachineState(MachineState_T aMachineState)
 {
     LogFlowThisFuncEnter();
@@ -8982,5 +8100,5 @@
 
     /* wait for state dependents to drop to zero */
-    ensureNoStateDependencies();
+    i_ensureNoStateDependencies();
 
     if (mData->mMachineState != aMachineState)
@@ -9011,7 +8129,7 @@
  *      must be called from under the object's lock!
  */
-HRESULT Machine::findSharedFolder(const Utf8Str &aName,
-                                  ComObjPtr<SharedFolder> &aSharedFolder,
-                                  bool aSetError /* = false */)
+HRESULT Machine::i_findSharedFolder(const Utf8Str &aName,
+                                    ComObjPtr<SharedFolder> &aSharedFolder,
+                                    bool aSetError /* = false */)
 {
     HRESULT rc = VBOX_E_OBJECT_NOT_FOUND;
@@ -9056,9 +8174,10 @@
  *
  * @param config Machine settings from XML.
- * @param puuidRegistry If != NULL, Medium::setRegistryIdIfFirst() gets called with this registry ID for each attached medium in the config.
+ * @param puuidRegistry If != NULL, Medium::setRegistryIdIfFirst() gets called with this registry ID
+ * for each attached medium in the config.
  * @return
  */
-HRESULT Machine::loadMachineDataFromSettings(const settings::MachineConfigFile &config,
-                                             const Guid *puuidRegistry)
+HRESULT Machine::i_loadMachineDataFromSettings(const settings::MachineConfigFile &config,
+                                               const Guid *puuidRegistry)
 {
     // copy name, description, OS type, teleporter, UTC etc.
@@ -9096,5 +8215,5 @@
     {
         Utf8Str stateFilePathFull(config.strStateFile);
-        int vrc = calculateFullPath(stateFilePathFull, stateFilePathFull);
+        int vrc = i_calculateFullPath(stateFilePathFull, stateFilePathFull);
         if (RT_FAILURE(vrc))
             return setError(E_FAIL,
@@ -9130,7 +8249,7 @@
     {
         // determine machine folder
-        Utf8Str strMachineFolder = getSettingsFileFull();
+        Utf8Str strMachineFolder = i_getSettingsFileFull();
         strMachineFolder.stripFilename();
-        rc = mParent->initMedia(getId(),         // media registry ID == machine UUID
+        rc = mParent->initMedia(i_getId(),       // media registry ID == machine UUID
                                 config.mediaRegistry,
                                 strMachineFolder);
@@ -9147,18 +8266,18 @@
         const settings::Snapshot &snap = config.llFirstSnapshot.front();
 
-        rc = loadSnapshot(snap,
-                          config.uuidCurrentSnapshot,
-                          NULL);        // no parent == first snapshot
+        rc = i_loadSnapshot(snap,
+                            config.uuidCurrentSnapshot,
+                            NULL);        // no parent == first snapshot
         if (FAILED(rc)) return rc;
     }
 
     // hardware data
-    rc = loadHardware(config.hardwareMachine, &config.debugging, &config.autostart);
+    rc = i_loadHardware(config.hardwareMachine, &config.debugging, &config.autostart);
     if (FAILED(rc)) return rc;
 
     // load storage controllers
-    rc = loadStorageControllers(config.storageMachine,
-                                puuidRegistry,
-                                NULL /* puuidSnapshot */);
+    rc = i_loadStorageControllers(config.storageMachine,
+                                  puuidRegistry,
+                                  NULL /* puuidSnapshot */);
     if (FAILED(rc)) return rc;
 
@@ -9167,5 +8286,5 @@
      *  otherwise it will be not possible to change the settings
      *  somewhere in the code above because all setters will be
-     *  blocked by checkStateDependency(MutableStateDep).
+     *  blocked by i_checkStateDependency(MutableStateDep).
      */
 
@@ -9175,10 +8294,10 @@
         mSSData->strStateFilePath.setNull();
 
-        /* no need to use setMachineState() during init() */
+        /* no need to use i_setMachineState() during init() */
         mData->mMachineState = MachineState_Aborted;
     }
     else if (!mSSData->strStateFilePath.isEmpty())
     {
-        /* no need to use setMachineState() during init() */
+        /* no need to use i_setMachineState() during init() */
         mData->mMachineState = MachineState_Saved;
     }
@@ -9197,10 +8316,10 @@
  *  @param aParentSnapshot  Parent snapshot.
  */
-HRESULT Machine::loadSnapshot(const settings::Snapshot &data,
-                              const Guid &aCurSnapshotId,
-                              Snapshot *aParentSnapshot)
-{
-    AssertReturn(!isSnapshotMachine(), E_FAIL);
-    AssertReturn(!isSessionMachine(), E_FAIL);
+HRESULT Machine::i_loadSnapshot(const settings::Snapshot &data,
+                                const Guid &aCurSnapshotId,
+                                Snapshot *aParentSnapshot)
+{
+    AssertReturn(!i_isSnapshotMachine(), E_FAIL);
+    AssertReturn(!i_isSessionMachine(), E_FAIL);
 
     HRESULT rc = S_OK;
@@ -9211,5 +8330,5 @@
         /* optional */
         strStateFile = data.strStateFile;
-        int vrc = calculateFullPath(strStateFile, strStateFile);
+        int vrc = i_calculateFullPath(strStateFile, strStateFile);
         if (RT_FAILURE(vrc))
             return setError(E_FAIL,
@@ -9261,7 +8380,7 @@
         const settings::Snapshot &childData = *it;
         // recurse
-        rc = loadSnapshot(childData,
-                          aCurSnapshotId,
-                          pSnapshot);       // parent = the one we created above
+        rc = i_loadSnapshot(childData,
+                            aCurSnapshotId,
+                            pSnapshot);       // parent = the one we created above
         if (FAILED(rc)) return rc;
     }
@@ -9277,8 +8396,8 @@
  *  @param pAutostart     Pointer to the autostart settings.
  */
-HRESULT Machine::loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg,
-                              const settings::Autostart *pAutostart)
-{
-    AssertReturn(!isSessionMachine(), E_FAIL);
+HRESULT Machine::i_loadHardware(const settings::Hardware &data, const settings::Debugging *pDbg,
+                                const settings::Autostart *pAutostart)
+{
+    AssertReturn(!i_isSessionMachine(), E_FAIL);
 
     HRESULT rc = S_OK;
@@ -9364,7 +8483,5 @@
 
         // boot order
-        for (size_t i = 0;
-             i < RT_ELEMENTS(mHWData->mBootOrder);
-             i++)
+        for (size_t i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
         {
             settings::BootOrderMap::const_iterator it = data.mapBootOrder.find(i);
@@ -9383,5 +8500,5 @@
         mHWData->mVideoCaptureHeight = data.ulVideoCaptureVertRes;
         mHWData->mVideoCaptureEnabled = data.fVideoCaptureEnabled;
-        for (unsigned i = 0; i < RT_ELEMENTS(mHWData->maVideoCaptureScreens); i++)
+        for (unsigned i = 0; i < RT_ELEMENTS(mHWData->maVideoCaptureScreens); ++i)
             mHWData->maVideoCaptureScreens[i] = ASMBitTest(&data.u64VideoCaptureScreens, i);
         AssertCompile(RT_ELEMENTS(mHWData->maVideoCaptureScreens) == sizeof(data.u64VideoCaptureScreens) * 8);
@@ -9389,5 +8506,5 @@
         mHWData->mVideoCaptureFPS = data.ulVideoCaptureFPS;
         if (!data.strVideoCaptureFile.isEmpty())
-            calculateFullPath(data.strVideoCaptureFile, mHWData->mVideoCaptureFile);
+            i_calculateFullPath(data.strVideoCaptureFile, mHWData->mVideoCaptureFile);
         else
             mHWData->mVideoCaptureFile.setNull();
@@ -9396,5 +8513,4 @@
         mHWData->mKeyboardHIDType = data.keyboardHIDType;
         mHWData->mChipsetType = data.chipsetType;
-        mHWData->mParavirtProvider = data.paravirtProvider;
         mHWData->mEmulatedUSBCardReaderEnabled = data.fEmulatedUSBCardReader;
         mHWData->mHPETEnabled = data.fHPETEnabled;
@@ -9435,5 +8551,5 @@
         {
             mNetworkAdapters.resize(newCount);
-            for (ULONG slot = oldCount; slot < mNetworkAdapters.size(); slot++)
+            for (ULONG slot = oldCount; slot < mNetworkAdapters.size(); ++slot)
             {
                 unconst(mNetworkAdapters[slot]).createObject();
@@ -9492,5 +8608,5 @@
             ComObjPtr<SharedFolder> sharedFolder;
             /* Check for double entries. Not allowed! */
-            rc = findSharedFolder(sf.strName, sharedFolder, false /* aSetError */);
+            rc = i_findSharedFolder(sf.strName, sharedFolder, false /* aSetError */);
             if (SUCCEEDED(rc))
                 return setError(VBOX_E_OBJECT_IN_USE,
@@ -9501,5 +8617,5 @@
              * reported when the machine starts. */
             sharedFolder.createObject();
-            rc = sharedFolder->init(getMachine(),
+            rc = sharedFolder->init(i_getMachine(),
                                     sf.strName,
                                     sf.strHostPath,
@@ -9558,5 +8674,5 @@
 #endif /* VBOX_WITH_GUEST_PROPS defined */
 
-        rc = loadDebugging(pDbg);
+        rc = i_loadDebugging(pDbg);
         if (FAILED(rc))
             return rc;
@@ -9582,5 +8698,5 @@
  * @param   pDbg        Pointer to the settings.
  */
-HRESULT Machine::loadDebugging(const settings::Debugging *pDbg)
+HRESULT Machine::i_loadDebugging(const settings::Debugging *pDbg)
 {
     mHWData->mDebugging = *pDbg;
@@ -9590,16 +8706,16 @@
 
 /**
- *  Called from loadMachineDataFromSettings() for the storage controller data, including media.
+ *  Called from i_loadMachineDataFromSettings() for the storage controller data, including media.
  *
  * @param data
- * @param puuidRegistry media registry ID to set media to or NULL; see Machine::loadMachineDataFromSettings()
+ * @param puuidRegistry media registry ID to set media to or NULL; see Machine::i_loadMachineDataFromSettings()
  * @param puuidSnapshot
  * @return
  */
-HRESULT Machine::loadStorageControllers(const settings::Storage &data,
-                                        const Guid *puuidRegistry,
-                                        const Guid *puuidSnapshot)
-{
-    AssertReturn(!isSessionMachine(), E_FAIL);
+HRESULT Machine::i_loadStorageControllers(const settings::Storage &data,
+                                          const Guid *puuidRegistry,
+                                          const Guid *puuidSnapshot)
+{
+    AssertReturn(!i_isSessionMachine(), E_FAIL);
 
     HRESULT rc = S_OK;
@@ -9613,5 +8729,5 @@
         ComObjPtr<StorageController> pCtl;
         /* Try to find one with the name first. */
-        rc = getStorageControllerByName(ctlData.strName, pCtl, false /* aSetError */);
+        rc = i_getStorageControllerByName(ctlData.strName, pCtl, false /* aSetError */);
         if (SUCCEEDED(rc))
             return setError(VBOX_E_OBJECT_IN_USE,
@@ -9650,8 +8766,8 @@
 
         /* Load the attached devices now. */
-        rc = loadStorageDevices(pCtl,
-                                ctlData,
-                                puuidRegistry,
-                                puuidSnapshot);
+        rc = i_loadStorageDevices(pCtl,
+                                  ctlData,
+                                  puuidRegistry,
+                                  puuidSnapshot);
         if (FAILED(rc)) return rc;
     }
@@ -9661,16 +8777,16 @@
 
 /**
- * Called from loadStorageControllers for a controller's devices.
+ * Called from i_loadStorageControllers for a controller's devices.
  *
  * @param aStorageController
  * @param data
- * @param puuidRegistry media registry ID to set media to or NULL; see Machine::loadMachineDataFromSettings()
+ * @param puuidRegistry media registry ID to set media to or NULL; see Machine::i_loadMachineDataFromSettings()
  * @param aSnapshotId  pointer to the snapshot ID if this is a snapshot machine
  * @return
  */
-HRESULT Machine::loadStorageDevices(StorageController *aStorageController,
-                                    const settings::StorageController &data,
-                                    const Guid *puuidRegistry,
-                                    const Guid *puuidSnapshot)
+HRESULT Machine::i_loadStorageDevices(StorageController *aStorageController,
+                                      const settings::StorageController &data,
+                                      const Guid *puuidRegistry,
+                                      const Guid *puuidSnapshot)
 {
     HRESULT rc = S_OK;
@@ -9717,5 +8833,6 @@
             case DeviceType_DVD:
                 if (dev.strHostDriveSrc.isNotEmpty())
-                    rc = mParent->i_host()->i_findHostDriveByName(dev.deviceType, dev.strHostDriveSrc, false /* fRefresh */, medium);
+                    rc = mParent->i_host()->i_findHostDriveByName(dev.deviceType, dev.strHostDriveSrc,
+                                                                  false /* fRefresh */, medium);
                 else
                     rc = mParent->i_findRemoveableMedium(dev.deviceType,
@@ -9725,5 +8842,6 @@
                                                          medium);
                 if (rc == VBOX_E_OBJECT_NOT_FOUND)
-                    // This is not an error. The host drive or UUID might have vanished, so just go ahead without this removeable medium attachment
+                    // This is not an error. The host drive or UUID might have vanished, so just go
+                    // ahead without this removeable medium attachment
                     rc = S_OK;
             break;
@@ -9735,5 +8853,5 @@
                 if (FAILED(rc))
                 {
-                    if (isSnapshotMachine())
+                    if (i_isSnapshotMachine())
                     {
                         // wrap another error message around the "cannot find hard disk" set by findHardDisk
@@ -9753,5 +8871,5 @@
                 if (medium->i_getType() == MediumType_Immutable)
                 {
-                    if (isSnapshotMachine())
+                    if (i_isSnapshotMachine())
                         return setError(E_FAIL,
                                         tr("Immutable hard disk '%s' with UUID {%RTuuid} cannot be directly attached to snapshot with UUID {%RTuuid} "
@@ -9773,5 +8891,5 @@
                 if (medium->i_getType() == MediumType_MultiAttach)
                 {
-                    if (isSnapshotMachine())
+                    if (i_isSnapshotMachine())
                         return setError(E_FAIL,
                                         tr("Multi-attach hard disk '%s' with UUID {%RTuuid} cannot be directly attached to snapshot with UUID {%RTuuid} "
@@ -9791,5 +8909,5 @@
                 }
 
-                if (    !isSnapshotMachine()
+                if (    !i_isSnapshotMachine()
                      && medium->i_getChildren().size() != 0
                    )
@@ -9803,6 +8921,6 @@
                                     medium->i_getChildren().size());
 
-                if (findAttachment(mMediaData->mAttachments,
-                                   medium))
+                if (i_findAttachment(mMediaData->mAttachments,
+                                     medium))
                     return setError(E_FAIL,
                                     tr("Hard disk '%s' with UUID {%RTuuid} is already attached to the virtual machine '%s' ('%s')"),
@@ -9867,5 +8985,5 @@
             AutoWriteLock mlock(medium COMMA_LOCKVAL_SRC_POS);
 
-            if (isSnapshotMachine())
+            if (i_isSnapshotMachine())
                 rc = medium->i_addBackReference(mData->mUuid, *puuidSnapshot);
             else
@@ -9884,5 +9002,5 @@
         /* back up mMediaData to let registeredInit() properly rollback on failure
          * (= limited accessibility) */
-        setModified(IsModified_Storage);
+        i_setModified(IsModified_Storage);
         mMediaData.backup();
         mMediaData->mAttachments.push_back(pAttachment);
@@ -9899,7 +9017,7 @@
  *  @param aSetError    true to set extended error info on failure
  */
-HRESULT Machine::findSnapshotById(const Guid &aId,
-                                  ComObjPtr<Snapshot> &aSnapshot,
-                                  bool aSetError /* = false */)
+HRESULT Machine::i_findSnapshotById(const Guid &aId,
+                                    ComObjPtr<Snapshot> &aSnapshot,
+                                    bool aSetError /* = false */)
 {
     AutoReadLock chlock(this COMMA_LOCKVAL_SRC_POS);
@@ -9936,7 +9054,7 @@
  *  @param aSetError    true to set extended error info on failure
  */
-HRESULT Machine::findSnapshotByName(const Utf8Str &strName,
-                                    ComObjPtr<Snapshot> &aSnapshot,
-                                    bool aSetError /* = false */)
+HRESULT Machine::i_findSnapshotByName(const Utf8Str &strName,
+                                      ComObjPtr<Snapshot> &aSnapshot,
+                                      bool aSetError /* = false */)
 {
     AssertReturn(!strName.isEmpty(), E_INVALIDARG);
@@ -9972,7 +9090,7 @@
  *  @param aSetError             true to set extended error info on failure
  */
-HRESULT Machine::getStorageControllerByName(const Utf8Str &aName,
-                                            ComObjPtr<StorageController> &aStorageController,
-                                            bool aSetError /* = false */)
+HRESULT Machine::i_getStorageControllerByName(const Utf8Str &aName,
+                                              ComObjPtr<StorageController> &aStorageController,
+                                              bool aSetError /* = false */)
 {
     AssertReturn(!aName.isEmpty(), E_INVALIDARG);
@@ -10003,7 +9121,7 @@
  *  @param aSetError             true to set extended error info on failure
  */
-HRESULT Machine::getUSBControllerByName(const Utf8Str &aName,
-                                        ComObjPtr<USBController> &aUSBController,
-                                        bool aSetError /* = false */)
+HRESULT Machine::i_getUSBControllerByName(const Utf8Str &aName,
+                                          ComObjPtr<USBController> &aUSBController,
+                                          bool aSetError /* = false */)
 {
     AssertReturn(!aName.isEmpty(), E_INVALIDARG);
@@ -10032,5 +9150,5 @@
  * @param enmType                USB controller type.
  */
-ULONG Machine::getUSBControllerCountByType(USBControllerType_T enmType)
+ULONG Machine::i_getUSBControllerCountByType(USBControllerType_T enmType)
 {
     ULONG cCtrls = 0;
@@ -10047,6 +9165,6 @@
 }
 
-HRESULT Machine::getMediumAttachmentsOfController(CBSTR aName,
-                                                  MediaData::AttachmentList &atts)
+HRESULT Machine::i_getMediumAttachmentsOfController(const Utf8Str &aName,
+                                                    MediaData::AttachmentList &atts)
 {
     AutoCaller autoCaller(this);
@@ -10060,5 +9178,4 @@
     {
         const ComObjPtr<MediumAttachment> &pAtt = *it;
-
         // should never happen, but deal with NULL pointers in the list.
         AssertStmt(!pAtt.isNull(), continue);
@@ -10073,5 +9190,5 @@
         AutoReadLock attLock(pAtt COMMA_LOCKVAL_SRC_POS);
 
-        if (pAtt->i_getControllerName() == aName)
+        if (pAtt->i_getControllerName() == Bstr(aName).raw())
             atts.push_back(pAtt);
     }
@@ -10080,6 +9197,7 @@
 }
 
+
 /**
- *  Helper for #saveSettings. Cares about renaming the settings directory and
+ *  Helper for #i_saveSettings. Cares about renaming the settings directory and
  *  file if the machine name was changed and about creating a new settings file
  *  if this is a new machine.
@@ -10087,5 +9205,5 @@
  *  @note Must be never called directly but only from #saveSettings().
  */
-HRESULT Machine::prepareSaveSettings(bool *pfNeedsGlobalSaveSettings)
+HRESULT Machine::i_prepareSaveSettings(bool *pfNeedsGlobalSaveSettings)
 {
     AssertReturn(isWriteLockOnCurrentThread(), E_FAIL);
@@ -10141,5 +9259,6 @@
             newConfigDir = configDir;
             if (   configDir.length() >= groupPlusName.length()
-                && !RTPathCompare(configDir.substr(configDir.length() - groupPlusName.length(), groupPlusName.length()).c_str(), groupPlusName.c_str()))
+                && !RTPathCompare(configDir.substr(configDir.length() - groupPlusName.length(), groupPlusName.length()).c_str(),
+                                  groupPlusName.c_str()))
             {
                 newConfigDir = newConfigDir.substr(0, configDir.length() - groupPlusName.length());
@@ -10225,5 +9344,5 @@
             mParent->i_copyPathRelativeToConfig(newConfigFile, mData->m_strConfigFile);
 
-            // store the old and new so that VirtualBox::saveSettings() can update
+            // store the old and new so that VirtualBox::i_saveSettings() can update
             // the media registry
             if (    mData->mRegistered
@@ -10320,11 +9439,11 @@
  * @param pfNeedsGlobalSaveSettings Optional pointer to a bool that must have been
  *          initialized to false and that will be set to true by this function if
- *          the caller must invoke VirtualBox::saveSettings() because the global
+ *          the caller must invoke VirtualBox::i_saveSettings() because the global
  *          settings have changed. This will happen if a machine rename has been
  *          saved and the global machine and media registries will therefore need
  *          updating.
  */
-HRESULT Machine::saveSettings(bool *pfNeedsGlobalSaveSettings,
-                              int aFlags /*= 0*/)
+HRESULT Machine::i_saveSettings(bool *pfNeedsGlobalSaveSettings,
+                                int  aFlags /*= 0*/)
 {
     LogFlowThisFuncEnter();
@@ -10334,7 +9453,7 @@
     /* make sure child objects are unable to modify the settings while we are
      * saving them */
-    ensureNoStateDependencies();
-
-    AssertReturn(!isSnapshotMachine(),
+    i_ensureNoStateDependencies();
+
+    AssertReturn(!i_isSnapshotMachine(),
                  E_FAIL);
 
@@ -10345,5 +9464,5 @@
      * settings directory and file if the machine name was changed and about
      * creating a new settings file if this is a new machine. */
-    rc = prepareSaveSettings(pfNeedsGlobalSaveSettings);
+    rc = i_prepareSaveSettings(pfNeedsGlobalSaveSettings);
     if (FAILED(rc)) return rc;
 
@@ -10359,6 +9478,6 @@
 
         // now go and copy all the settings data from COM to the settings structures
-        // (this calles saveSettings() on all the COM objects in the machine)
-        copyMachineDataToSettings(*pNewConfig);
+        // (this calles i_saveSettings() on all the COM objects in the machine)
+        i_copyMachineDataToSettings(*pNewConfig);
 
         if (aFlags & SaveS_ResetCurStateModified)
@@ -10399,5 +9518,5 @@
         mData->pMachineConfigFile = pNewConfig;
         delete pOldConfig;
-        commit();
+        i_commit();
 
         // after saving settings, we are no longer different from the XML on disk
@@ -10425,5 +9544,5 @@
          * to the client process that creates them) and thus don't need to
          * inform callbacks. */
-        if (isSessionMachine())
+        if (i_isSessionMachine())
             mParent->i_onMachineDataChange(mData->mUuid);
     }
@@ -10441,5 +9560,5 @@
  * This gets called from two locations:
  *
- *  --  Machine::saveSettings(), during the regular XML writing;
+ *  --  Machine::i_saveSettings(), during the regular XML writing;
  *
  *  --  Appliance::buildXMLForOneVirtualSystem(), when a machine gets
@@ -10459,5 +9578,5 @@
  * This throws XML errors and HRESULT, so the caller must have a catch block!
  */
-void Machine::copyMachineDataToSettings(settings::MachineConfigFile &config)
+void Machine::i_copyMachineDataToSettings(settings::MachineConfigFile &config)
 {
     // deep copy extradata
@@ -10502,5 +9621,5 @@
         Assert(!mSSData->strStateFilePath.isEmpty());
         /* try to make the file name relative to the settings file dir */
-        copyPathRelativeToMachine(mSSData->strStateFilePath, config.strStateFile);
+        i_copyPathRelativeToMachine(mSSData->strStateFilePath, config.strStateFile);
     }
     else
@@ -10519,8 +9638,8 @@
     /// @todo Live Migration:        config.fTeleported = (mData->mMachineState == MachineState_Teleported);
 
-    HRESULT rc = saveHardware(config.hardwareMachine, &config.debugging, &config.autostart);
+    HRESULT rc = i_saveHardware(config.hardwareMachine, &config.debugging, &config.autostart);
     if (FAILED(rc)) throw rc;
 
-    rc = saveStorageControllers(config.storageMachine);
+    rc = i_saveStorageControllers(config.storageMachine);
     if (FAILED(rc)) throw rc;
 
@@ -10529,8 +9648,8 @@
     {
         // determine machine folder
-        Utf8Str strMachineFolder = getSettingsFileFull();
+        Utf8Str strMachineFolder = i_getSettingsFileFull();
         strMachineFolder.stripFilename();
         mParent->i_saveMediaRegistry(config.mediaRegistry,
-                                     getId(),             // only media with registry ID == machine UUID
+                                     i_getId(),             // only media with registry ID == machine UUID
                                      strMachineFolder);
             // this throws HRESULT
@@ -10538,5 +9657,5 @@
 
     // save snapshots
-    rc = saveAllSnapshots(config);
+    rc = i_saveAllSnapshots(config);
     if (FAILED(rc)) throw rc;
 }
@@ -10548,5 +9667,5 @@
  * @return
  */
-HRESULT Machine::saveAllSnapshots(settings::MachineConfigFile &config)
+HRESULT Machine::i_saveAllSnapshots(settings::MachineConfigFile &config)
 {
     AssertReturn(isWriteLockOnCurrentThread(), E_FAIL);
@@ -10598,6 +9717,6 @@
  *                        which happens to live in mHWData.
  */
-HRESULT Machine::saveHardware(settings::Hardware &data, settings::Debugging *pDbg,
-                              settings::Autostart *pAutostart)
+HRESULT Machine::i_saveHardware(settings::Hardware &data, settings::Debugging *pDbg,
+                                settings::Autostart *pAutostart)
 {
     HRESULT rc = S_OK;
@@ -10610,5 +9729,6 @@
              && mSSData->strStateFilePath.isEmpty()
            )
-            mHWData->mHWVersion = "2";  /** @todo Is this safe, to update mHWVersion here? If not some other point needs to be found where this can be done. */
+            mHWData->mHWVersion = "2";  /** @todo Is this safe, to update mHWVersion here? If not some
+                                            other point needs to be found where this can be done. */
 
         data.strVersion = mHWData->mHWVersion;
@@ -10629,10 +9749,10 @@
         /* Standard and Extended CPUID leafs. */
         data.llCpuIdLeafs.clear();
-        for (unsigned idx = 0; idx < RT_ELEMENTS(mHWData->mCpuIdStdLeafs); idx++)
+        for (unsigned idx = 0; idx < RT_ELEMENTS(mHWData->mCpuIdStdLeafs); ++idx)
         {
             if (mHWData->mCpuIdStdLeafs[idx].ulId != UINT32_MAX)
                 data.llCpuIdLeafs.push_back(mHWData->mCpuIdStdLeafs[idx]);
         }
-        for (unsigned idx = 0; idx < RT_ELEMENTS(mHWData->mCpuIdExtLeafs); idx++)
+        for (unsigned idx = 0; idx < RT_ELEMENTS(mHWData->mCpuIdExtLeafs); ++idx)
         {
             if (mHWData->mCpuIdExtLeafs[idx].ulId != UINT32_MAX)
@@ -10647,5 +9767,5 @@
         if (data.fCpuHotPlug)
         {
-            for (unsigned idx = 0; idx < data.cCPUs; idx++)
+            for (unsigned idx = 0; idx < data.cCPUs; ++idx)
             {
                 if (mHWData->mCPUAttached[idx])
@@ -10675,4 +9795,5 @@
         data.paravirtProvider = mHWData->mParavirtProvider;
 
+
         data.fEmulatedUSBCardReader = !!mHWData->mEmulatedUSBCardReaderEnabled;
 
@@ -10682,7 +9803,5 @@
         // boot order
         data.mapBootOrder.clear();
-        for (size_t i = 0;
-             i < RT_ELEMENTS(mHWData->mBootOrder);
-             ++i)
+        for (size_t i = 0; i < RT_ELEMENTS(mHWData->mBootOrder); ++i)
             data.mapBootOrder[i] = mHWData->mBootOrder[i];
 
@@ -10698,5 +9817,5 @@
         data.ulVideoCaptureFPS = mHWData->mVideoCaptureFPS;
         data.fVideoCaptureEnabled  = !!mHWData->mVideoCaptureEnabled;
-        for (unsigned i = 0; i < sizeof(data.u64VideoCaptureScreens) * 8; i++)
+        for (unsigned i = 0; i < sizeof(data.u64VideoCaptureScreens) * 8; ++i)
         {
             if (mHWData->maVideoCaptureScreens[i])
@@ -10706,5 +9825,5 @@
         }
         /* store relative video capture file if possible */
-        copyPathRelativeToMachine(mHWData->mVideoCaptureFile, data.strVideoCaptureFile);
+        i_copyPathRelativeToMachine(mHWData->mVideoCaptureFile, data.strVideoCaptureFile);
 
         /* VRDEServer settings (optional) */
@@ -10717,7 +9836,5 @@
 
         /* USB Controller (required) */
-        for (USBControllerList::const_iterator it = mUSBControllers->begin();
-             it != mUSBControllers->end();
-             ++it)
+        for (USBControllerList::const_iterator it = mUSBControllers->begin(); it != mUSBControllers->end(); ++it)
         {
             ComObjPtr<USBController> ctrl = *it;
@@ -10756,7 +9873,5 @@
         /* Serial ports */
         data.llSerialPorts.clear();
-        for (ULONG slot = 0;
-             slot < RT_ELEMENTS(mSerialPorts);
-             ++slot)
+        for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
         {
             settings::SerialPort s;
@@ -10770,7 +9885,5 @@
         /* Parallel ports */
         data.llParallelPorts.clear();
-        for (ULONG slot = 0;
-             slot < RT_ELEMENTS(mParallelPorts);
-             ++slot)
+        for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
         {
             settings::ParallelPort p;
@@ -10888,5 +10001,5 @@
  *  @param aNode    <StorageControllers> node to save the VM hardware configuration to.
  */
-HRESULT Machine::saveStorageControllers(settings::Storage &data)
+HRESULT Machine::i_saveStorageControllers(settings::Storage &data)
 {
     data.llStorageControllers.clear();
@@ -10930,5 +10043,5 @@
 
         /* save the devices now. */
-        rc = saveStorageDevices(pCtl, ctl);
+        rc = i_saveStorageDevices(pCtl, ctl);
         ComAssertComRCRet(rc, rc);
 
@@ -10942,20 +10055,20 @@
  *  Saves the hard disk configuration.
  */
-HRESULT Machine::saveStorageDevices(ComObjPtr<StorageController> aStorageController,
-                                    settings::StorageController &data)
+HRESULT Machine::i_saveStorageDevices(ComObjPtr<StorageController> aStorageController,
+                                      settings::StorageController &data)
 {
     MediaData::AttachmentList atts;
 
-    HRESULT rc = getMediumAttachmentsOfController(Bstr(aStorageController->i_getName()).raw(), atts);
+    HRESULT rc = i_getMediumAttachmentsOfController(aStorageController->i_getName(), atts);
     if (FAILED(rc)) return rc;
 
     data.llAttachedDevices.clear();
-    for (MediaData::AttachmentList::const_iterator it = atts.begin();
+    for ( MediaData::AttachmentList::iterator it = atts.begin();
          it != atts.end();
          ++it)
     {
         settings::AttachedDevice dev;
-
-        MediumAttachment *pAttach = *it;
+        IMediumAttachment *iA = *it;
+        MediumAttachment *pAttach = static_cast<MediumAttachment *>(iA);
         Medium *pMedium = pAttach->i_getMedium();
 
@@ -10992,5 +10105,5 @@
  *  @note Locks objects for writing.
  */
-HRESULT Machine::saveStateSettings(int aFlags)
+HRESULT Machine::i_saveStateSettings(int aFlags)
 {
     if (aFlags == 0)
@@ -11017,5 +10130,5 @@
             if (!mSSData->strStateFilePath.isEmpty())
                 /* try to make the file name relative to the settings file dir */
-                copyPathRelativeToMachine(mSSData->strStateFilePath, mData->pMachineConfigFile->strStateFile);
+                i_copyPathRelativeToMachine(mSSData->strStateFilePath, mData->pMachineConfigFile->strStateFile);
             else
                 mData->pMachineConfigFile->strStateFile.setNull();
@@ -11052,5 +10165,5 @@
  * @param pMedium
  */
-void Machine::addMediumToRegistry(ComObjPtr<Medium> &pMedium)
+void Machine::i_addMediumToRegistry(ComObjPtr<Medium> &pMedium)
 {
     /* Paranoia checks: do not hold machine or media tree locks. */
@@ -11072,5 +10185,5 @@
     if (mData->pMachineConfigFile->canHaveOwnMediaRegistry())
         // machine XML is VirtualBox 4.0 or higher:
-        uuid = getId();     // machine UUID
+        uuid = i_getId();     // machine UUID
     else
         uuid = mParent->i_getGlobalRegistryId(); // VirtualBox global registry UUID
@@ -11119,7 +10232,7 @@
  * @note Locks this object and the media tree for writing.
  */
-HRESULT Machine::createImplicitDiffs(IProgress *aProgress,
-                                     ULONG aWeight,
-                                     bool aOnline)
+HRESULT Machine::i_createImplicitDiffs(IProgress *aProgress,
+                                       ULONG aWeight,
+                                       bool aOnline)
 {
     LogFlowThisFunc(("aOnline=%d\n", aOnline));
@@ -11244,5 +10357,5 @@
 
             Utf8Str strFullSnapshotFolder;
-            calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
+            i_calculateFullPath(mUserData->s.strSnapshotFolder, strFullSnapshotFolder);
 
             ComObjPtr<Medium> diff;
@@ -11339,5 +10452,5 @@
  * @note Locks this object and the media tree for writing.
  */
-HRESULT Machine::deleteImplicitDiffs(bool aOnline)
+HRESULT Machine::i_deleteImplicitDiffs(bool aOnline)
 {
     LogFlowThisFunc(("aOnline=%d\n", aOnline));
@@ -11388,5 +10501,5 @@
         && oldState != MachineState_DeletingSnapshotPaused
        )
-        setMachineState(MachineState_SettingUp);
+           i_setMachineState(MachineState_SettingUp);
 
     // use appropriate locked media map (online or offline)
@@ -11466,5 +10579,5 @@
 
             /* Was this medium attached before? */
-            if (!findAttachment(oldAtts, pMedium))
+            if (!i_findAttachment(oldAtts, pMedium))
             {
                 /* no: de-associate */
@@ -11502,7 +10615,5 @@
             alock.release();
 
-            for (MediaData::AttachmentList::const_iterator it = implicitAtts.begin();
-                 it != implicitAtts.end();
-                 ++it)
+            for (MediaData::AttachmentList::const_iterator it = implicitAtts.begin(); it != implicitAtts.end(); ++it)
             {
                 // Remove medium associated with this attachment.
@@ -11515,5 +10626,6 @@
                 rc = pMedium->i_deleteStorage(NULL /*aProgress*/, true /*aWait*/);
                 // continue on delete failure, just collect error messages
-                AssertMsg(SUCCEEDED(rc), ("rc=%Rhrc it=%s hd=%s\n", rc, pAtt->i_getLogName(), pMedium->i_getLocationFull().c_str() ));
+                AssertMsg(SUCCEEDED(rc), ("rc=%Rhrc it=%s hd=%s\n", rc, pAtt->i_getLogName(),
+                                          pMedium->i_getLocationFull().c_str() ));
                 mrc = rc;
             }
@@ -11541,5 +10653,5 @@
 
     if (mData->mMachineState == MachineState_SettingUp)
-        setMachineState(oldState);
+        i_setMachineState(oldState);
 
     /* unlock all hard disks we locked when there is no VM */
@@ -11567,12 +10679,10 @@
  * @return
  */
-MediumAttachment* Machine::findAttachment(const MediaData::AttachmentList &ll,
-                                          IN_BSTR aControllerName,
-                                          LONG aControllerPort,
-                                          LONG aDevice)
-{
-   for (MediaData::AttachmentList::const_iterator it = ll.begin();
-        it != ll.end();
-        ++it)
+MediumAttachment* Machine::i_findAttachment(const MediaData::AttachmentList &ll,
+                                            IN_BSTR aControllerName,
+                                            LONG aControllerPort,
+                                            LONG aDevice)
+{
+   for (MediaData::AttachmentList::const_iterator it = ll.begin(); it != ll.end(); ++it)
     {
         MediumAttachment *pAttach = *it;
@@ -11595,10 +10705,8 @@
  * @return
  */
-MediumAttachment* Machine::findAttachment(const MediaData::AttachmentList &ll,
-                                          ComObjPtr<Medium> pMedium)
-{
-   for (MediaData::AttachmentList::const_iterator it = ll.begin();
-        it != ll.end();
-        ++it)
+MediumAttachment* Machine::i_findAttachment(const MediaData::AttachmentList &ll,
+                                            ComObjPtr<Medium> pMedium)
+{
+   for (MediaData::AttachmentList::const_iterator it = ll.begin(); it != ll.end(); ++it)
     {
         MediumAttachment *pAttach = *it;
@@ -11622,10 +10730,8 @@
  * @return
  */
-MediumAttachment* Machine::findAttachment(const MediaData::AttachmentList &ll,
-                                          Guid &id)
-{
-   for (MediaData::AttachmentList::const_iterator it = ll.begin();
-         it != ll.end();
-         ++it)
+MediumAttachment* Machine::i_findAttachment(const MediaData::AttachmentList &ll,
+                                            Guid &id)
+{
+   for (MediaData::AttachmentList::const_iterator it = ll.begin(); it != ll.end(); ++it)
     {
         MediumAttachment *pAttach = *it;
@@ -11644,10 +10750,11 @@
  * @param pAttach Medium attachment to detach.
  * @param writeLock Machine write lock which the caller must have locked once. This may be released temporarily in here.
- * @param pSnapshot If NULL, then the detachment is for the current machine. Otherwise this is for a SnapshotMachine, and this must be its snapshot.
+ * @param pSnapshot If NULL, then the detachment is for the current machine. Otherwise this is for a
+ * SnapshotMachine, and this must be its snapshot.
  * @return
  */
-HRESULT Machine::detachDevice(MediumAttachment *pAttach,
-                              AutoWriteLock &writeLock,
-                              Snapshot *pSnapshot)
+HRESULT Machine::i_detachDevice(MediumAttachment *pAttach,
+                                AutoWriteLock &writeLock,
+                                Snapshot *pSnapshot)
 {
     ComObjPtr<Medium> oldmedium = pAttach->i_getMedium();
@@ -11669,5 +10776,5 @@
          * protect with the special state */
         MachineState_T oldState = mData->mMachineState;
-        setMachineState(MachineState_SettingUp);
+        i_setMachineState(MachineState_SettingUp);
 
         writeLock.release();
@@ -11678,10 +10785,10 @@
         writeLock.acquire();
 
-        setMachineState(oldState);
+        i_setMachineState(oldState);
 
         if (FAILED(rc)) return rc;
     }
 
-    setModified(IsModified_Storage);
+    i_setModified(IsModified_Storage);
     mMediaData.backup();
     mMediaData->mAttachments.remove(pAttach);
@@ -11703,5 +10810,5 @@
  * Goes thru all media of the given list and
  *
- * 1) calls detachDevice() on each of them for this machine and
+ * 1) calls i_detachDevice() on each of them for this machine and
  * 2) adds all Medium objects found in the process to the given list,
  *    depending on cleanupMode.
@@ -11715,17 +10822,18 @@
  *
  * Requires caller and locking. The machine lock must be passed in because it
- * will be passed on to detachDevice which needs it for temporary unlocking.
+ * will be passed on to i_detachDevice which needs it for temporary unlocking.
  *
- * @param writeLock Machine lock from top-level caller; this gets passed to detachDevice.
+ * @param writeLock Machine lock from top-level caller; this gets passed to i_detachDevice.
  * @param pSnapshot Must be NULL when called for a "real" Machine or a snapshot object if called for a SnapshotMachine.
- * @param cleanupMode If DetachAllReturnHardDisksOnly, only hard disk media get added to llMedia; if Full, then all media get added;
+ * @param cleanupMode If DetachAllReturnHardDisksOnly, only hard disk media get added to llMedia; if
+ * Full, then all media get added;
  *          otherwise no media get added.
  * @param llMedia Caller's list to receive Medium objects which got detached so caller can close() them, depending on cleanupMode.
  * @return
  */
-HRESULT Machine::detachAllMedia(AutoWriteLock &writeLock,
-                                Snapshot *pSnapshot,
-                                CleanupMode_T cleanupMode,
-                                MediaList &llMedia)
+HRESULT Machine::i_detachAllMedia(AutoWriteLock &writeLock,
+                                  Snapshot *pSnapshot,
+                                  CleanupMode_T cleanupMode,
+                                  MediaList &llMedia)
 {
     Assert(isWriteLockOnCurrentThread());
@@ -11733,11 +10841,9 @@
     HRESULT rc;
 
-    // make a temporary list because detachDevice invalidates iterators into
+    // make a temporary list because i_detachDevice invalidates iterators into
     // mMediaData->mAttachments
     MediaData::AttachmentList llAttachments2 = mMediaData->mAttachments;
 
-    for (MediaData::AttachmentList::iterator it = llAttachments2.begin();
-         it != llAttachments2.end();
-         ++it)
+    for (MediaData::AttachmentList::iterator it = llAttachments2.begin(); it != llAttachments2.end(); ++it)
     {
         ComObjPtr<MediumAttachment> &pAttach = *it;
@@ -11785,5 +10891,5 @@
 
         // real machine: then we need to use the proper method
-        rc = detachDevice(pAttach, writeLock, pSnapshot);
+        rc = i_detachDevice(pAttach, writeLock, pSnapshot);
 
         if (FAILED(rc))
@@ -11808,5 +10914,5 @@
  * @note Locks this object for writing!
  */
-void Machine::commitMedia(bool aOnline /*= false*/)
+void Machine::i_commitMedia(bool aOnline /*= false*/)
 {
     AutoCaller autoCaller(this);
@@ -11883,7 +10989,5 @@
         {
             /* was this medium attached before? */
-            for (MediaData::AttachmentList::iterator oldIt = oldAtts.begin();
-                 oldIt != oldAtts.end();
-                 ++oldIt)
+            for (MediaData::AttachmentList::iterator oldIt = oldAtts.begin(); oldIt != oldAtts.end(); ++oldIt)
             {
                 MediumAttachment *pOldAttach = *oldIt;
@@ -11902,7 +11006,5 @@
     /* enumerate remaining old attachments and de-associate from the
      * current machine state */
-    for (MediaData::AttachmentList::const_iterator it = oldAtts.begin();
-         it != oldAtts.end();
-         ++it)
+    for (MediaData::AttachmentList::const_iterator it = oldAtts.begin(); it != oldAtts.end(); ++it)
     {
         MediumAttachment *pAttach = *it;
@@ -11955,5 +11057,5 @@
     mMediaData.commit();
 
-    if (isSessionMachine())
+    if (i_isSessionMachine())
     {
         /*
@@ -11971,7 +11073,5 @@
              it != mMediaData->mAttachments.end();
              ++it)
-        {
             (*it)->i_updateParentMachine(mPeer);
-        }
 
         /* attach new data to the primary machine and reshare it */
@@ -11990,5 +11090,5 @@
  * @note Locks this object for writing!
  */
-void Machine::rollbackMedia()
+void Machine::i_rollbackMedia()
 {
     AutoCaller autoCaller(this);
@@ -12038,5 +11138,5 @@
     /** @todo convert all this Machine-based voodoo to MediumAttachment
      * based rollback logic. */
-    deleteImplicitDiffs(Global::IsOnline(mData->mMachineState));
+    i_deleteImplicitDiffs(Global::IsOnline(mData->mMachineState));
 
     return;
@@ -12054,5 +11154,5 @@
  *  @note Not thread safe (must be called from this object's lock).
  */
-bool Machine::isInOwnDir(Utf8Str *aSettingsDir /* = NULL */) const
+bool Machine::i_isInOwnDir(Utf8Str *aSettingsDir /* = NULL */) const
 {
     Utf8Str strMachineDirName(mData->m_strConfigFileFull);  // path/to/machinesfolder/vmname/vmname.vbox
@@ -12081,5 +11181,5 @@
  * @note Locks objects for writing!
  */
-void Machine::rollback(bool aNotify)
+void Machine::i_rollback(bool aNotify)
 {
     AutoCaller autoCaller(this);
@@ -12161,5 +11261,5 @@
 
     if (mData->flModifications & IsModified_Storage)
-        rollbackMedia();
+        i_rollbackMedia();
 
     if (mBIOSSettings)
@@ -12185,5 +11285,5 @@
 
     if (mData->flModifications & IsModified_NetworkAdapters)
-        for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+        for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
             if (    mNetworkAdapters[slot]
                  && mNetworkAdapters[slot]->i_isModified())
@@ -12194,5 +11294,5 @@
 
     if (mData->flModifications & IsModified_SerialPorts)
-        for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+        for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
             if (    mSerialPorts[slot]
                  && mSerialPorts[slot]->i_isModified())
@@ -12203,5 +11303,5 @@
 
     if (mData->flModifications & IsModified_ParallelPorts)
-        for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+        for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
             if (    mParallelPorts[slot]
                  && mParallelPorts[slot]->i_isModified())
@@ -12220,23 +11320,23 @@
 
         if (flModifications & IsModified_SharedFolders)
-            that->onSharedFolderChange();
+            that->i_onSharedFolderChange();
 
         if (flModifications & IsModified_VRDEServer)
-            that->onVRDEServerChange(/* aRestart */ TRUE);
+            that->i_onVRDEServerChange(/* aRestart */ TRUE);
         if (flModifications & IsModified_USB)
-            that->onUSBControllerChange();
-
-        for (ULONG slot = 0; slot < networkAdapters.size(); slot++)
+            that->i_onUSBControllerChange();
+
+        for (ULONG slot = 0; slot < networkAdapters.size(); ++slot)
             if (networkAdapters[slot])
-                that->onNetworkAdapterChange(networkAdapters[slot], FALSE);
-        for (ULONG slot = 0; slot < RT_ELEMENTS(serialPorts); slot++)
+                that->i_onNetworkAdapterChange(networkAdapters[slot], FALSE);
+        for (ULONG slot = 0; slot < RT_ELEMENTS(serialPorts); ++slot)
             if (serialPorts[slot])
-                that->onSerialPortChange(serialPorts[slot]);
-        for (ULONG slot = 0; slot < RT_ELEMENTS(parallelPorts); slot++)
+                that->i_onSerialPortChange(serialPorts[slot]);
+        for (ULONG slot = 0; slot < RT_ELEMENTS(parallelPorts); ++slot)
             if (parallelPorts[slot])
-                that->onParallelPortChange(parallelPorts[slot]);
+                that->i_onParallelPortChange(parallelPorts[slot]);
 
         if (flModifications & IsModified_Storage)
-            that->onStorageControllerChange();
+            that->i_onStorageControllerChange();
 
 #if 0
@@ -12254,5 +11354,5 @@
  * @note Locks this object and children for writing.
  */
-void Machine::commit()
+void Machine::i_commit()
 {
     AutoCaller autoCaller(this);
@@ -12273,5 +11373,5 @@
 
     if (mMediaData.isBackedUp())
-        commitMedia(Global::IsOnline(mData->mMachineState));
+        i_commitMedia(Global::IsOnline(mData->mMachineState));
 
     mBIOSSettings->i_commit();
@@ -12308,7 +11408,7 @@
         }
         /* uninit any no longer needed network adapters */
-        for (size_t slot = newSize; slot < mNetworkAdapters.size(); slot++)
+        for (size_t slot = newSize; slot < mNetworkAdapters.size(); ++slot)
             mNetworkAdapters[slot]->uninit();
-        for (size_t slot = newSize; slot < mPeer->mNetworkAdapters.size(); slot++)
+        for (size_t slot = newSize; slot < mPeer->mNetworkAdapters.size(); ++slot)
         {
             if (mPeer->mNetworkAdapters[slot])
@@ -12327,12 +11427,10 @@
     }
     if (commitNetworkAdapters)
-    {
-        for (size_t slot = 0; slot < mNetworkAdapters.size(); slot++)
+        for (size_t slot = 0; slot < mNetworkAdapters.size(); ++slot)
             mNetworkAdapters[slot]->i_commit();
-    }
-
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
         mSerialPorts[slot]->i_commit();
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
         mParallelPorts[slot]->i_commit();
 
@@ -12479,5 +11577,5 @@
     }
 
-    if (isSessionMachine())
+    if (i_isSessionMachine())
     {
         /* attach new data to the primary machine and reshare it */
@@ -12502,8 +11600,8 @@
  *       unsaved.
  */
-void Machine::copyFrom(Machine *aThat)
-{
-    AssertReturnVoid(!isSnapshotMachine());
-    AssertReturnVoid(aThat->isSnapshotMachine());
+void Machine::i_copyFrom(Machine *aThat)
+{
+    AssertReturnVoid(!i_isSnapshotMachine());
+    AssertReturnVoid(aThat->i_isSnapshotMachine());
 
     AssertReturnVoid(!Global::IsOnline(mData->mMachineState));
@@ -12519,5 +11617,5 @@
         ComObjPtr<SharedFolder> folder;
         folder.createObject();
-        HRESULT rc = folder->initCopy(getMachine(), *it);
+        HRESULT rc = folder->initCopy(i_getMachine(), *it);
         AssertComRC(rc);
         *it = folder;
@@ -12557,9 +11655,9 @@
 
     mNetworkAdapters.resize(aThat->mNetworkAdapters.size());
-    for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+    for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
         mNetworkAdapters[slot]->i_copyFrom(aThat->mNetworkAdapters[slot]);
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
         mSerialPorts[slot]->i_copyFrom(aThat->mSerialPorts[slot]);
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
         mParallelPorts[slot]->i_copyFrom(aThat->mParallelPorts[slot]);
 }
@@ -12572,5 +11670,5 @@
  * @param   enmCtrlType    The controller type to check for.
  */
-bool Machine::isControllerHotplugCapable(StorageControllerType_T enmCtrlType)
+bool Machine::i_isControllerHotplugCapable(StorageControllerType_T enmCtrlType)
 {
     ComPtr<ISystemProperties> systemProperties;
@@ -12587,5 +11685,5 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
 
-void Machine::getDiskList(MediaList &list)
+void Machine::i_getDiskList(MediaList &list)
 {
     for (MediaData::AttachmentList::const_iterator it = mMediaData->mAttachments.begin();
@@ -12607,5 +11705,5 @@
 }
 
-void Machine::registerMetrics(PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid)
+void Machine::i_registerMetrics(PerformanceCollector *aCollector, Machine *aMachine, RTPROCESS pid)
 {
     AssertReturnVoid(isWriteLockOnCurrentThread());
@@ -12634,5 +11732,5 @@
     aCollector->registerBaseMetric(ramUsage);
     MediaList disks;
-    getDiskList(disks);
+    i_getDiskList(disks);
     pm::BaseMetric *diskUsage = new pm::MachineDiskUsage(hal, aMachine, disks,
                                                          diskUsageUsed);
@@ -12690,7 +11788,9 @@
     pm::SubMetric *guestMemBalloon = new pm::SubMetric("Guest/RAM/Usage/Balloon",  "Amount of ballooned physical guest RAM.");
     pm::SubMetric *guestMemShared = new pm::SubMetric("Guest/RAM/Usage/Shared",  "Amount of shared physical guest RAM.");
-    pm::SubMetric *guestMemCache = new pm::SubMetric("Guest/RAM/Usage/Cache",        "Total amount of guest (disk) cache memory.");
-
-    pm::SubMetric *guestPagedTotal = new pm::SubMetric("Guest/Pagefile/Usage/Total",    "Total amount of space in the page file.");
+    pm::SubMetric *guestMemCache = new pm::SubMetric(
+                                                "Guest/RAM/Usage/Cache",        "Total amount of guest (disk) cache memory.");
+
+    pm::SubMetric *guestPagedTotal = new pm::SubMetric(
+                                         "Guest/Pagefile/Usage/Total",    "Total amount of space in the page file.");
 
     /* Create and register base metrics */
@@ -12765,5 +11865,5 @@
 }
 
-void Machine::unregisterMetrics(PerformanceCollector *aCollector, Machine *aMachine)
+void Machine::i_unregisterMetrics(PerformanceCollector *aCollector, Machine *aMachine)
 {
     AssertReturnVoid(isWriteLockOnCurrentThread());
@@ -12889,5 +11989,5 @@
     mAudioAdapter->init(this, aMachine->mAudioAdapter);
     /* create a list of serial ports that will be mutable */
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mSerialPorts); ++slot)
     {
         unconst(mSerialPorts[slot]).createObject();
@@ -12895,5 +11995,5 @@
     }
     /* create a list of parallel ports that will be mutable */
-    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); slot++)
+    for (ULONG slot = 0; slot < RT_ELEMENTS(mParallelPorts); ++slot)
     {
         unconst(mParallelPorts[slot]).createObject();
@@ -12907,5 +12007,5 @@
     /* create a list of network adapters that will be mutable */
     mNetworkAdapters.resize(aMachine->mNetworkAdapters.size());
-    for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+    for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
     {
         unconst(mNetworkAdapters[slot]).createObject();
@@ -13018,9 +12118,9 @@
 #ifdef VBOX_WITH_RESOURCE_USAGE_API
     /*
-     * It is safe to call Machine::unregisterMetrics() here because
+     * It is safe to call Machine::i_unregisterMetrics() here because
      * PerformanceCollector::samplerCallback no longer accesses guest methods
      * holding the lock.
      */
-    unregisterMetrics(mParent->i_performanceCollector(), mPeer);
+    i_unregisterMetrics(mParent->i_performanceCollector(), mPeer);
     /* The guest must be unregistered after its metrics (@bugref{5949}). */
     LogAleksey(("{%p} " LOG_FN_FMT ": mCollectorGuest=%p\n",
@@ -13041,5 +12141,5 @@
         /* reset the state to Aborted */
         if (mData->mMachineState != MachineState_Aborted)
-            setMachineState(MachineState_Aborted);
+            i_setMachineState(MachineState_Aborted);
     }
 
@@ -13048,5 +12148,5 @@
     {
         LogWarningThisFunc(("Discarding unsaved settings changes!\n"));
-        rollback(false /* aNotify */);
+        i_rollback(false /* aNotify */);
     }
 
@@ -13064,5 +12164,5 @@
         /* delete all differencing hard disks created (this will also attach
          * their parents back by rolling back mMediaData) */
-        rollbackMedia();
+        i_rollbackMedia();
 
         // delete the saved state file (it might have been already created)
@@ -13071,5 +12171,5 @@
         Utf8Str strStateFile = mConsoleTaskData.mSnapshot->i_getStateFilePath();
         mConsoleTaskData.mSnapshot->uninit();
-        releaseSavedStateFile(strStateFile, NULL /* pSnapshotToIgnore */ );
+        i_releaseSavedStateFile(strStateFile, NULL /* pSnapshotToIgnore */ );
     }
 
@@ -13108,26 +12208,26 @@
     for (; miNATNetworksStarted > 0; miNATNetworksStarted--)
     {
-        for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+        for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
         {
             NetworkAttachmentType_T type;
             HRESULT hrc;
 
-            hrc = mNetworkAdapters[slot]->COMGETTER(AttachmentType)(&type);
-            if (   SUCCEEDED(hrc)
-                && type == NetworkAttachmentType_NATNetwork)
-            {
-                Bstr name;
-                hrc = mNetworkAdapters[slot]->COMGETTER(NATNetwork)(name.asOutParam());
-                if (SUCCEEDED(hrc))
-                {
-                    multilock.release();
-                    LogRel(("VM '%s' stops using NAT network '%ls'\n",
-                            mUserData->s.strName.c_str(), name.raw()));
-                    mParent->i_natNetworkRefDec(name.raw());
-                    multilock.acquire();
+             hrc = mNetworkAdapters[slot]->COMGETTER(AttachmentType)(&type);
+             if (   SUCCEEDED(hrc)
+                 && type == NetworkAttachmentType_NATNetwork)
+             {
+                 Bstr name;
+                 hrc = mNetworkAdapters[slot]->COMGETTER(NATNetwork)(name.asOutParam());
+                 if (SUCCEEDED(hrc))
+                 {
+                     multilock.release();
+                     LogRel(("VM '%s' stops using NAT network '%ls'\n",
+                             mUserData->s.strName.c_str(), name.raw()));
+                     mParent->i_natNetworkRefDec(name.raw());
+                     multilock.acquire();
                 }
-            }
-        }
-    }
+             }
+         }
+     }
 
     /*
@@ -13163,7 +12263,7 @@
         else
             mData->mSession.mProgress->i_notifyComplete(E_FAIL,
-                                                       COM_IIDOF(ISession),
-                                                       getComponentName(),
-                                                       tr("The VM session was aborted"));
+                                                        COM_IIDOF(ISession),
+                                                        getComponentName(),
+                                                        tr("The VM session was aborted"));
         mData->mSession.mProgress.setNull();
     }
@@ -13275,9 +12375,9 @@
 
 /**
- *  @note Locks the same as #setMachineState() does.
+ *  @note Locks the same as #i_setMachineState() does.
  */
 STDMETHODIMP SessionMachine::UpdateState(MachineState_T aMachineState)
 {
-    return setMachineState(aMachineState);
+    return i_setMachineState(aMachineState);
 }
 
@@ -13303,5 +12403,5 @@
     if (miNATNetworksStarted < 1)
     {
-        for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
+        for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot)
         {
             NetworkAttachmentType_T type;
@@ -13350,5 +12450,5 @@
     if (mData->mSession.mProgress)
     {
-        mData->mSession.mProgress->i_notifyComplete((HRESULT)iResult);
+        mData->mSession.mProgress->notifyComplete((HRESULT)iResult);
         mData->mSession.mProgress.setNull();
     }
@@ -13360,6 +12460,6 @@
          * now to offer the performance metrics for a running machine
          * object. Doing it earlier wouldn't be safe. */
-        registerMetrics(mParent->i_performanceCollector(), mPeer,
-                        mData->mSession.mPID);
+        i_registerMetrics(mParent->i_performanceCollector(), mPeer,
+                          mData->mSession.mPID);
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
     }
@@ -13375,6 +12475,4 @@
     LogFlowThisFuncEnter();
 
-    CheckComArgOutPointerValid(aProgress);
-
     AutoCaller autoCaller(this);
     AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
@@ -13388,5 +12486,5 @@
     ComObjPtr<Progress> pProgress;
     pProgress.createObject();
-    pProgress->init(getVirtualBox(),
+    pProgress->init(i_getVirtualBox(),
                     static_cast<IMachine *>(this) /* aInitiator */,
                     Bstr(tr("Stopping the virtual machine")).raw(),
@@ -13398,5 +12496,5 @@
 
     /* set the state to Stopping (this is expected by Console::PowerDown()) */
-    setMachineState(MachineState_Stopping);
+    i_setMachineState(MachineState_Stopping);
 
     pProgress.queryInterfaceTo(aProgress);
@@ -13429,5 +12527,5 @@
      */
     if (FAILED(iResult))
-        setMachineState(mConsoleTaskData.mLastState);
+        i_setMachineState(mConsoleTaskData.mLastState);
 
     /* notify the progress object about operation completion */
@@ -13467,7 +12565,4 @@
 {
     LogFlowThisFunc(("\n"));
-
-    CheckComArgNotNull(aUSBDevice);
-    CheckComArgOutPointerValid(aMatched);
 
     AutoCaller autoCaller(this);
@@ -13639,8 +12734,8 @@
             /* finalize the progress, someone might wait if a frontend
              * closes the session before powering on the VM. */
-            mData->mSession.mProgress->i_notifyComplete(E_FAIL,
-                                                        COM_IIDOF(ISession),
-                                                        getComponentName(),
-                                                        tr("The VM session was closed before any attempt to power it on"));
+            mData->mSession.mProgress->notifyComplete(E_FAIL,
+                                                      COM_IIDOF(ISession),
+                                                      getComponentName(),
+                                                      tr("The VM session was closed before any attempt to power it on"));
             mData->mSession.mProgress.setNull();
         }
@@ -13710,5 +12805,5 @@
     ComObjPtr<Progress> pProgress;
     pProgress.createObject();
-    pProgress->init(getVirtualBox(),
+    pProgress->init(i_getVirtualBox(),
                     static_cast<IMachine *>(this) /* aInitiator */,
                     Bstr(tr("Saving the execution state of the virtual machine")).raw(),
@@ -13718,5 +12813,5 @@
     /* stateFilePath is null when the machine is not running */
     if (mData->mMachineState == MachineState_Paused)
-        composeSavedStateFilename(strStateFilePath);
+        i_composeSavedStateFilename(strStateFilePath);
 
     /* fill in the console task data */
@@ -13726,5 +12821,5 @@
 
     /* set the state to Saving (this is expected by Console::SaveState()) */
-    setMachineState(MachineState_Saving);
+    i_setMachineState(MachineState_Saving);
 
     strStateFilePath.cloneTo(aStateFilePath);
@@ -13760,5 +12855,5 @@
      */
     if (FAILED(iResult))
-        setMachineState(mConsoleTaskData.mLastState);
+        i_setMachineState(mConsoleTaskData.mLastState);
 
     return endSavingState(iResult, aErrMsg);
@@ -13785,5 +12880,5 @@
 
     Utf8Str stateFilePathFull = aSavedStateFile;
-    int vrc = calculateFullPath(stateFilePathFull, stateFilePathFull);
+    int vrc = i_calculateFullPath(stateFilePathFull, stateFilePathFull);
     if (RT_FAILURE(vrc))
         return setError(VBOX_E_FILE_ERROR,
@@ -13794,8 +12889,8 @@
     mSSData->strStateFilePath = stateFilePathFull;
 
-    /* The below setMachineState() will detect the state transition and will
+    /* The below i_setMachineState() will detect the state transition and will
      * update the settings file */
 
-    return setMachineState(MachineState_Saved);
+    return i_setMachineState(MachineState_Saved);
 }
 
@@ -13856,5 +12951,5 @@
 STDMETHODIMP SessionMachine::PushGuestProperty(IN_BSTR aName,
                                                IN_BSTR aValue,
-                                               LONG64 aTimestamp,
+                                               LONG64  aTimestamp,
                                                IN_BSTR aFlags)
 {
@@ -13908,5 +13003,5 @@
         }
 
-        setModified(IsModified_MachineData);
+        i_setModified(IsModified_MachineData);
         mHWData.backup();
 
@@ -13984,6 +13079,6 @@
 STDMETHODIMP SessionMachine::UnlockMedia()
 {
-    unlockMedia();
-    return S_OK;
+    HRESULT hrc = unlockMedia();
+    return hrc;
 }
 
@@ -14030,13 +13125,13 @@
         oldmedium = pAttach->i_getMedium();
 
-        setModified(IsModified_Storage);
+        i_setModified(IsModified_Storage);
         mMediaData.backup();
 
         // The backup operation makes the pAttach reference point to the
         // old settings. Re-get the correct reference.
-        pAttach = findAttachment(mMediaData->mAttachments,
-                                 ctrlName.raw(),
-                                 lPort,
-                                 lDevice);
+        pAttach = i_findAttachment(mMediaData->mAttachments,
+                                   ctrlName.raw(),
+                                   lPort,
+                                   lDevice);
 
         {
@@ -14052,5 +13147,5 @@
         }
 
-        setModified(IsModified_Storage);
+        i_setModified(IsModified_Storage);
     }
     else
@@ -14086,5 +13181,5 @@
  * @note Locks this object for writing.
  */
-bool SessionMachine::checkForDeath()
+bool SessionMachine::i_checkForDeath()
 {
     Uninit::Reason reason;
@@ -14126,5 +13221,5 @@
 }
 
-void SessionMachine::getTokenId(Utf8Str &strTokenId)
+void SessionMachine::i_getTokenId(Utf8Str &strTokenId)
 {
     LogFlowThisFunc(("\n"));
@@ -14140,5 +13235,5 @@
 }
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
-IToken *SessionMachine::getToken()
+IToken *SessionMachine::i_getToken()
 {
     LogFlowThisFunc(("\n"));
@@ -14155,5 +13250,5 @@
 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */
 
-Machine::ClientToken *SessionMachine::getClientToken()
+Machine::ClientToken *SessionMachine::i_getClientToken()
 {
     LogFlowThisFunc(("\n"));
@@ -14169,5 +13264,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter)
+HRESULT SessionMachine::i_onNetworkAdapterChange(INetworkAdapter *networkAdapter, BOOL changeAdapter)
 {
     LogFlowThisFunc(("\n"));
@@ -14192,6 +13287,7 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onNATRedirectRuleChange(ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTR aRuleName,
-                                 NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort, IN_BSTR aGuestIp, LONG aGuestPort)
+HRESULT SessionMachine::i_onNATRedirectRuleChange(ULONG ulSlot, BOOL aNatRuleRemove, IN_BSTR aRuleName,
+                                                  NATProtocol_T aProto, IN_BSTR aHostIp, LONG aHostPort,
+                                                  IN_BSTR aGuestIp, LONG aGuestPort)
 {
     LogFlowThisFunc(("\n"));
@@ -14213,5 +13309,6 @@
      */
 
-    mParent->i_onNatRedirectChange(getId(), ulSlot, RT_BOOL(aNatRuleRemove), aRuleName, aProto, aHostIp, (uint16_t)aHostPort, aGuestIp, (uint16_t)aGuestPort);
+    mParent->i_onNatRedirectChange(i_getId(), ulSlot, RT_BOOL(aNatRuleRemove), aRuleName, aProto, aHostIp,
+                                   (uint16_t)aHostPort, aGuestIp, (uint16_t)aGuestPort);
     return S_OK;
 }
@@ -14220,5 +13317,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onSerialPortChange(ISerialPort *serialPort)
+HRESULT SessionMachine::i_onSerialPortChange(ISerialPort *serialPort)
 {
     LogFlowThisFunc(("\n"));
@@ -14243,5 +13340,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onParallelPortChange(IParallelPort *parallelPort)
+HRESULT SessionMachine::i_onParallelPortChange(IParallelPort *parallelPort)
 {
     LogFlowThisFunc(("\n"));
@@ -14266,5 +13363,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onStorageControllerChange()
+HRESULT SessionMachine::i_onStorageControllerChange()
 {
     LogFlowThisFunc(("\n"));
@@ -14289,5 +13386,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onMediumChange(IMediumAttachment *aAttachment, BOOL aForce)
+HRESULT SessionMachine::i_onMediumChange(IMediumAttachment *aAttachment, BOOL aForce)
 {
     LogFlowThisFunc(("\n"));
@@ -14312,5 +13409,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onCPUChange(ULONG aCPU, BOOL aRemove)
+HRESULT SessionMachine::i_onCPUChange(ULONG aCPU, BOOL aRemove)
 {
     LogFlowThisFunc(("\n"));
@@ -14332,5 +13429,5 @@
 }
 
-HRESULT SessionMachine::onCPUExecutionCapChange(ULONG aExecutionCap)
+HRESULT SessionMachine::i_onCPUExecutionCapChange(ULONG aExecutionCap)
 {
     LogFlowThisFunc(("\n"));
@@ -14355,5 +13452,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onVRDEServerChange(BOOL aRestart)
+HRESULT SessionMachine::i_onVRDEServerChange(BOOL aRestart)
 {
     LogFlowThisFunc(("\n"));
@@ -14378,5 +13475,5 @@
  * @note Locks this object for reading.
  */
-HRESULT SessionMachine::onVideoCaptureChange()
+HRESULT SessionMachine::i_onVideoCaptureChange()
 {
     LogFlowThisFunc(("\n"));
@@ -14401,5 +13498,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onUSBControllerChange()
+HRESULT SessionMachine::i_onUSBControllerChange()
 {
     LogFlowThisFunc(("\n"));
@@ -14424,5 +13521,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onSharedFolderChange()
+HRESULT SessionMachine::i_onSharedFolderChange()
 {
     LogFlowThisFunc(("\n"));
@@ -14447,5 +13544,5 @@
  * @note Locks this object for reading.
  */
-HRESULT SessionMachine::onClipboardModeChange(ClipboardMode_T aClipboardMode)
+HRESULT SessionMachine::i_onClipboardModeChange(ClipboardMode_T aClipboardMode)
 {
     LogFlowThisFunc(("\n"));
@@ -14470,5 +13567,5 @@
  * @note Locks this object for reading.
  */
-HRESULT SessionMachine::onDnDModeChange(DnDMode_T aDnDMode)
+HRESULT SessionMachine::i_onDnDModeChange(DnDMode_T aDnDMode)
 {
     LogFlowThisFunc(("\n"));
@@ -14493,5 +13590,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup)
+HRESULT SessionMachine::i_onBandwidthGroupChange(IBandwidthGroup *aBandwidthGroup)
 {
     LogFlowThisFunc(("\n"));
@@ -14516,5 +13613,5 @@
  *  @note Locks this object for reading.
  */
-HRESULT SessionMachine::onStorageDeviceChange(IMediumAttachment *aAttachment, BOOL aRemove, BOOL aSilent)
+HRESULT SessionMachine::i_onStorageDeviceChange(IMediumAttachment *aAttachment, BOOL aRemove, BOOL aSilent)
 {
     LogFlowThisFunc(("\n"));
@@ -14542,5 +13639,5 @@
  *  @note locks this object for reading.
  */
-bool SessionMachine::hasMatchingUSBFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs)
+bool SessionMachine::i_hasMatchingUSBFilter(const ComObjPtr<HostUSBDevice> &aDevice, ULONG *aMaskedIfs)
 {
     AutoCaller autoCaller(this);
@@ -14576,7 +13673,7 @@
  *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
  */
-HRESULT SessionMachine::onUSBDeviceAttach(IUSBDevice *aDevice,
-                                          IVirtualBoxErrorInfo *aError,
-                                          ULONG aMaskedIfs)
+HRESULT SessionMachine::i_onUSBDeviceAttach(IUSBDevice *aDevice,
+                                            IVirtualBoxErrorInfo *aError,
+                                            ULONG aMaskedIfs)
 {
     LogFlowThisFunc(("\n"));
@@ -14609,6 +13706,6 @@
  *  @note The calls shall hold no locks. Will temporarily lock this object for reading.
  */
-HRESULT SessionMachine::onUSBDeviceDetach(IN_BSTR aId,
-                                          IVirtualBoxErrorInfo *aError)
+HRESULT SessionMachine::i_onUSBDeviceDetach(IN_BSTR aId,
+                                            IVirtualBoxErrorInfo *aError)
 {
     LogFlowThisFunc(("\n"));
@@ -14667,5 +13764,5 @@
 
         /* save all VM settings */
-        rc = saveSettings(NULL);
+        rc = i_saveSettings(NULL);
                 // no need to check whether VirtualBox.xml needs saving also since
                 // we can't have a name change pending at this point
@@ -14713,8 +13810,9 @@
  *
  * @param strStateFile
- * @param pSnapshotToIgnore  Passed to Snapshot::sharesSavedStateFile(); this snapshot is ignored in the test for whether the saved state file is in use.
+ * @param pSnapshotToIgnore  Passed to Snapshot::sharesSavedStateFile(); this snapshot is ignored in
+ * the test for whether the saved state file is in use.
  */
-void SessionMachine::releaseSavedStateFile(const Utf8Str &strStateFile,
-                                           Snapshot *pSnapshotToIgnore)
+void SessionMachine::i_releaseSavedStateFile(const Utf8Str &strStateFile,
+                                             Snapshot *pSnapshotToIgnore)
 {
     // it is safe to delete this saved state file if it is not currently in use by the machine ...
@@ -14826,8 +13924,8 @@
  * Undoes the locks made by by #lockMedia().
  */
-void SessionMachine::unlockMedia()
+HRESULT SessionMachine::unlockMedia()
 {
     AutoCaller autoCaller(this);
-    AssertComRCReturnVoid(autoCaller.rc());
+    AssertComRCReturn(autoCaller.rc(),autoCaller.rc());
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
@@ -14839,4 +13937,5 @@
     HRESULT rc = mData->mSession.mLockedMedia.Clear();
     AssertComRC(rc);
+    return rc;
 }
 
@@ -14845,10 +13944,10 @@
  *
  * @note Locks this object for writing.
- * @note This method must not call saveSettings or SaveSettings, otherwise
+ * @note This method must not call i_saveSettings or SaveSettings, otherwise
  *       it can cause crashes in random places due to unexpectedly committing
  *       the current settings. The caller is responsible for that. The call
  *       to saveStateSettings is fine, because this method does not commit.
  */
-HRESULT SessionMachine::setMachineState(MachineState_T aMachineState)
+HRESULT SessionMachine::i_setMachineState(MachineState_T aMachineState)
 {
     LogFlowThisFuncEnter();
@@ -15001,5 +14100,5 @@
 
     /* redirect to the underlying peer machine */
-    mPeer->setMachineState(aMachineState);
+    mPeer->i_setMachineState(aMachineState);
 
     if (   aMachineState == MachineState_PoweredOff
@@ -15051,5 +14150,5 @@
 #endif
 
-    rc = saveStateSettings(stsFlags);
+    rc = i_saveStateSettings(stsFlags);
 
     if (   (   oldMachineState != MachineState_PoweredOff
@@ -15077,5 +14176,5 @@
  *  @note Locks this object for reading, then calls a client process.
  */
-HRESULT SessionMachine::updateMachineStateOnClient()
+HRESULT SessionMachine::i_updateMachineStateOnClient()
 {
     AutoCaller autoCaller(this);
@@ -15105,2 +14204,239 @@
     return directControl->UpdateMachineState(mData->mMachineState);
 }
+
+HRESULT Machine::setRemoveSavedStateFile(BOOL aRemove)
+{
+    NOREF(aRemove);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::updateState(MachineState_T aState)
+{
+    NOREF(aState);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::beginPowerUp(const ComPtr<IProgress> &aProgress)
+{
+    NOREF(aProgress);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::endPowerUp(LONG aResult)
+{
+    NOREF(aResult);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::beginPoweringDown(ComPtr<IProgress> &aProgress)
+{
+    NOREF(aProgress);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::endPoweringDown(LONG aResult,
+                                 const com::Utf8Str &aErrMsg)
+{
+    NOREF(aResult);
+    NOREF(aErrMsg);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::runUSBDeviceFilters(const ComPtr<IUSBDevice> &aDevice,
+                                     BOOL  *aMatched,
+                                     ULONG *aMaskedInterfaces)
+{
+    NOREF(aDevice);
+    NOREF(aMatched);
+    NOREF(aMaskedInterfaces);
+    ReturnComNotImplemented();
+
+}
+
+HRESULT Machine::captureUSBDevice(const com::Guid &aId)
+{
+    NOREF(aId);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::detachUSBDevice(const com::Guid &aId,
+                                 BOOL aDone)
+{
+    NOREF(aId);
+    NOREF(aDone);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::autoCaptureUSBDevices()
+{
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::detachAllUSBDevices(BOOL aDone)
+{
+    NOREF(aDone);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::onSessionEnd(const ComPtr<ISession> &aSession,
+                              ComPtr<IProgress> &aProgress)
+{
+    NOREF(aSession);
+    NOREF(aProgress);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::beginSavingState(ComPtr<IProgress> &aProgress,
+                                  com::Utf8Str &aStateFilePath)
+{
+    NOREF(aProgress);
+    NOREF(aStateFilePath);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::endSavingState(LONG aResult,
+                                const com::Utf8Str &aErrMsg)
+{
+    NOREF(aResult);
+    NOREF(aErrMsg);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::adoptSavedState(const com::Utf8Str &aSavedStateFile)
+{
+    NOREF(aSavedStateFile);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::beginTakingSnapshot(const ComPtr<IConsole> &aInitiator,
+                                     const com::Utf8Str &aName,
+                                     const com::Utf8Str &aDescription,
+                                     const ComPtr<IProgress> &aConsoleProgress,
+                                     BOOL aFTakingSnapshotOnline,
+                                     com::Utf8Str &aStateFilePath)
+{
+    NOREF(aInitiator);
+    NOREF(aName);
+    NOREF(aDescription);
+    NOREF(aConsoleProgress);
+    NOREF(aFTakingSnapshotOnline);
+    NOREF(aStateFilePath);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::endTakingSnapshot(BOOL aSuccess)
+{
+    NOREF(aSuccess);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::deleteSnapshot(const ComPtr<IConsole> &aInitiator,
+                                const com::Guid &aStartId,
+                                const com::Guid &aEndId,
+                                BOOL aDeleteAllChildren,
+                                MachineState_T *aMachineState,
+                                ComPtr<IProgress> &aProgress)
+{
+    NOREF(aInitiator);
+    NOREF(aStartId);
+    NOREF(aEndId);
+    NOREF(aDeleteAllChildren);
+    NOREF(aMachineState);
+    NOREF(aProgress);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::finishOnlineMergeMedium()
+{
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::restoreSnapshot(const ComPtr<IConsole> &aInitiator,
+                                 const ComPtr<ISnapshot> &aSnapshot,
+                                 MachineState_T *aMachineState,
+                                 ComPtr<IProgress> &aProgress)
+{
+    NOREF(aInitiator);
+    NOREF(aSnapshot);
+    NOREF(aMachineState);
+    NOREF(aProgress);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::pullGuestProperties(std::vector<com::Utf8Str> &aNames,
+                                     std::vector<com::Utf8Str> &aValues,
+                                     std::vector<LONG64> &aTimestamps,
+                                     std::vector<com::Utf8Str> &aFlags)
+{
+    NOREF(aNames);
+    NOREF(aValues);
+    NOREF(aTimestamps);
+    NOREF(aFlags);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::pushGuestProperty(const com::Utf8Str &aName,
+                                   const com::Utf8Str &aValue,
+                                   LONG64 aTimestamp,
+                                   const com::Utf8Str &aFlags)
+{
+    NOREF(aName);
+    NOREF(aValue);
+    NOREF(aTimestamp);
+    NOREF(aFlags);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::lockMedia()
+{
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::unlockMedia()
+{
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::ejectMedium(const ComPtr<IMediumAttachment> &aAttachment,
+                             ComPtr<IMediumAttachment> &aNewAttachment)
+{
+    NOREF(aAttachment);
+    NOREF(aNewAttachment);
+    ReturnComNotImplemented();
+}
+
+HRESULT Machine::reportVmStatistics(ULONG aValidStats,
+                                    ULONG aCpuUser,
+                                    ULONG aCpuKernel,
+                                    ULONG aCpuIdle,
+                                    ULONG aMemTotal,
+                                    ULONG aMemFree,
+                                    ULONG aMemBalloon,
+                                    ULONG aMemShared,
+                                    ULONG aMemCache,
+                                    ULONG aPagedTotal,
+                                    ULONG aMemAllocTotal,
+                                    ULONG aMemFreeTotal,
+                                    ULONG aMemBalloonTotal,
+                                    ULONG aMemSharedTotal,
+                                    ULONG aVmNetRx,
+                                    ULONG aVmNetTx)
+{
+    NOREF(aValidStats);
+    NOREF(aCpuUser);
+    NOREF(aCpuKernel);
+    NOREF(aCpuIdle);
+    NOREF(aMemTotal);
+    NOREF(aMemFree);
+    NOREF(aMemBalloon);
+    NOREF(aMemShared);
+    NOREF(aMemCache);
+    NOREF(aPagedTotal);
+    NOREF(aMemAllocTotal);
+    NOREF(aMemFreeTotal);
+    NOREF(aMemBalloonTotal);
+    NOREF(aMemSharedTotal);
+    NOREF(aVmNetRx);
+    NOREF(aVmNetTx);
+    ReturnComNotImplemented();
+}
Index: /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -208,5 +208,5 @@
     {
         SAVESTATETASK sst;
-        sst.snapshotUuid     = machine->getSnapshotId();
+        sst.snapshotUuid     = machine->i_getSnapshotId();
         sst.strSaveStateFile = bstrSrcSaveStatePath;
         uint64_t cbSize;
@@ -674,5 +674,5 @@
         ComObjPtr<Medium> diff;
         diff.createObject();
-        rc = diff->init(p->getVirtualBox(),
+        rc = diff->init(p->i_getVirtualBox(),
                         pParent->i_getPreferredDiffFormat(),
                         Utf8StrFmt("%s%c", strSnapshotFolder.c_str(), RTPATH_DELIMITER),
@@ -753,5 +753,5 @@
         /** @todo r=klaus this code cannot deal with someone crazy specifying
          * IMachine corresponding to a mutable machine as d->pSrcMachine */
-        if (d->pSrcMachine->isSessionMachine())
+        if (d->pSrcMachine->i_isSessionMachine())
             throw p->setError(E_INVALIDARG, "The source machine is mutable");
 
@@ -761,5 +761,5 @@
          * just replace the source (snapshot) machine with the current machine. */
         if (   d->mode == CloneMode_AllStates
-            && d->pSrcMachine->isSnapshotMachine())
+            && d->pSrcMachine->i_isSnapshotMachine())
         {
             Bstr bstrSrcMachineId;
@@ -767,5 +767,5 @@
             if (FAILED(rc)) throw rc;
             ComPtr<IMachine> newSrcMachine;
-            rc = d->pSrcMachine->getVirtualBox()->FindMachine(bstrSrcMachineId.raw(), newSrcMachine.asOutParam());
+            rc = d->pSrcMachine->i_getVirtualBox()->FindMachine(bstrSrcMachineId.raw(), newSrcMachine.asOutParam());
             if (FAILED(rc)) throw rc;
             d->pSrcMachine = (Machine*)(IMachine*)newSrcMachine;
@@ -775,5 +775,5 @@
         if (d->mode == CloneMode_MachineAndChildStates)
         {
-            if (d->pSrcMachine->isSnapshotMachine())
+            if (d->pSrcMachine->i_isSnapshotMachine())
             {
                 /* find machine object for current snapshot of current state */
@@ -782,5 +782,5 @@
                 if (FAILED(rc)) throw rc;
                 ComPtr<IMachine> pCurr;
-                rc = d->pSrcMachine->getVirtualBox()->FindMachine(bstrSrcMachineId.raw(), pCurr.asOutParam());
+                rc = d->pSrcMachine->i_getVirtualBox()->FindMachine(bstrSrcMachineId.raw(), pCurr.asOutParam());
                 if (FAILED(rc)) throw rc;
                 if (pCurr.isNull())
@@ -827,6 +827,6 @@
         AutoWriteLock trgLock(d->pTrgMachine COMMA_LOCKVAL_SRC_POS);
 
-        if (d->pSrcMachine->isSnapshotMachine())
-            d->snapshotId = d->pSrcMachine->getSnapshotId();
+        if (d->pSrcMachine->i_isSnapshotMachine())
+            d->snapshotId = d->pSrcMachine->i_getSnapshotId();
 
         /* Add the current machine and all snapshot machines below this machine
@@ -912,5 +912,5 @@
         rc = d->pProgress.createObject();
         if (FAILED(rc)) throw rc;
-        rc = d->pProgress->init(p->getVirtualBox(),
+        rc = d->pProgress->init(p->i_getVirtualBox(),
                                 static_cast<IMachine*>(d->pSrcMachine) /* aInitiator */,
                                 Bstr(p->tr("Cloning Machine")).raw(),
@@ -958,5 +958,5 @@
     /* Where should all the media go? */
     Utf8Str strTrgSnapshotFolder;
-    Utf8Str strTrgMachineFolder = d->pTrgMachine->getSettingsFileFull();
+    Utf8Str strTrgMachineFolder = d->pTrgMachine->i_getSettingsFileFull();
     strTrgMachineFolder.stripFilename();
 
@@ -1389,12 +1389,11 @@
              * over to the new machine. The machine have to be mutable for
              * this. */
-            rc = d->pTrgMachine->checkStateDependency(p->MutableStateDep);
+            rc = d->pTrgMachine->i_checkStateDependency(p->MutableStateDep);
             if (FAILED(rc)) throw rc;
-            rc = d->pTrgMachine->loadMachineDataFromSettings(trgMCF,
-                                                             &d->pTrgMachine->mData->mUuid);
+            rc = d->pTrgMachine->i_loadMachineDataFromSettings(trgMCF, &d->pTrgMachine->mData->mUuid);
             if (FAILED(rc)) throw rc;
             /* save all VM data */
             bool fNeedsGlobalSaveSettings = false;
-            rc = d->pTrgMachine->saveSettings(&fNeedsGlobalSaveSettings, Machine::SaveS_Force);
+            rc = d->pTrgMachine->i_saveSettings(&fNeedsGlobalSaveSettings, Machine::SaveS_Force);
             if (FAILED(rc)) throw rc;
             /* Release all locks */
Index: /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/MediumAttachmentImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -365,5 +365,5 @@
     {
         ComObjPtr<BandwidthGroup> pBwGroup;
-        hrc = m->pMachine->getBandwidthGroup(m->bd->strBandwidthGroup, pBwGroup, true /* fSetError */);
+        hrc = m->pMachine->i_getBandwidthGroup(m->bd->strBandwidthGroup, pBwGroup, true /* fSetError */);
 
         Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of the
Index: /trunk/src/VBox/Main/src-server/NATEngineImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NATEngineImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/NATEngineImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2010-2013 Oracle Corporation
+ * Copyright (C) 2010-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -259,5 +259,5 @@
 
     if (m_fModified)
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
     return S_OK;
 }
@@ -327,5 +327,5 @@
     r.u16GuestPort = aGuestPort;
     mNATRules.insert(std::make_pair(name, r));
-    mParent->setModified(Machine::IsModified_NetworkAdapters);
+    mParent->i_setModified(Machine::IsModified_NetworkAdapters);
     m_fModified = true;
 
@@ -334,6 +334,6 @@
 
     alock.release();
-    mParent->onNATRedirectRuleChange(ulSlot, FALSE, Bstr(name).raw(), aProto, Bstr(r.strHostIP).raw(),
-                                     r.u16HostPort, Bstr(r.strGuestIP).raw(), r.u16GuestPort);
+    mParent->i_onNATRedirectRuleChange(ulSlot, FALSE, Bstr(name).raw(), aProto, Bstr(r.strHostIP).raw(),
+                                       r.u16HostPort, Bstr(r.strGuestIP).raw(), r.u16GuestPort);
     return S_OK;
 }
@@ -356,10 +356,10 @@
 
     mNATRules.erase(it);
-    mParent->setModified(Machine::IsModified_NetworkAdapters);
+    mParent->i_setModified(Machine::IsModified_NetworkAdapters);
     m_fModified = true;
     mData->m.commit();
     alock.release();
-    mParent->onNATRedirectRuleChange(ulSlot, TRUE, Bstr(aName).raw(), proto, Bstr(strHostIP).raw(),
-                                     u16HostPort, Bstr(strGuestIP).raw(), u16GuestPort);
+    mParent->i_onNATRedirectRuleChange(ulSlot, TRUE, Bstr(aName).raw(), proto, Bstr(strHostIP).raw(),
+                                       u16HostPort, Bstr(strGuestIP).raw(), u16GuestPort);
     return S_OK;
 }
@@ -443,5 +443,5 @@
         mData->m.backup();
         mData->m->mNetwork = aNetwork;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -468,5 +468,5 @@
         mData->m.backup();
         mData->m->mBindIP = aHostIP;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -490,5 +490,5 @@
         mData->m.backup();
         mData->m->mTFTPPrefix = aTFTPPrefix;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -516,5 +516,5 @@
         mData->m.backup();
         mData->m->mTFTPBootFile = aTFTPBootFile;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -542,5 +542,5 @@
         mData->m.backup();
         mData->m->mTFTPNextServer = aTFTPNextServer;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -568,5 +568,5 @@
         mData->m.backup();
         mData->m->mDNSPassDomain = aDNSPassDomain;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -590,5 +590,5 @@
         mData->m.backup();
         mData->m->mDNSProxy = aDNSProxy;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -618,5 +618,5 @@
         mData->m.backup();
         mData->m->mDNSUseHostResolver = aDNSUseHostResolver;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
@@ -632,5 +632,5 @@
         mData->m.backup();
         mData->m->mAliasMode = aAliasMode;
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         m_fModified = true;
     }
Index: /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -70,5 +70,5 @@
 
     ComAssertRet(aParent, E_INVALIDARG);
-    uint32_t maxNetworkAdapters = Global::getMaxNetworkAdapters(aParent->getChipsetType());
+    uint32_t maxNetworkAdapters = Global::getMaxNetworkAdapters(aParent->i_getChipsetType());
     ComAssertRet(aSlot < maxNetworkAdapters, E_INVALIDARG);
 
@@ -261,10 +261,10 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* Changing the network adapter type during runtime is not allowed,
          * therefore no immediate change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -309,10 +309,10 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* Disabling the network adapter during runtime is not allowed
          * therefore no immediate change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -400,10 +400,10 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* Changing the MAC via the Main API during runtime is not allowed,
          * therefore no immediate change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -454,5 +454,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
@@ -464,5 +464,5 @@
 
         /* Adapt the CFGM logic and notify the guest => changeAdapter=TRUE. */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -506,5 +506,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
@@ -512,5 +512,5 @@
          * change immediately effect and to notify the guest that the network
          * might have changed, therefore changeAdapter=TRUE. */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -555,5 +555,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
@@ -561,5 +561,5 @@
          * change immediately effect and to notify the guest that the network
          * might have changed, therefore changeAdapter=TRUE. */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -602,5 +602,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
@@ -608,5 +608,5 @@
          * change immediately effect and to notify the guest that the network
          * might have changed, therefore changeAdapter=TRUE. */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -653,5 +653,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
         i_checkAndSwitchFromNatNetworking(oldNatNetworkName.raw());
@@ -661,5 +661,5 @@
          * change immediately effect and to notify the guest that the network
          * might have changed, therefore changeAdapter=TRUE. */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -692,5 +692,5 @@
         alock.release();
 
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -727,9 +727,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* No change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -765,9 +765,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* No change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -809,6 +809,6 @@
 
             alock.release();
-            mParent->setModifiedLock(Machine::IsModified_NetworkAdapters);
-            mParent->onNetworkAdapterChange(this, TRUE);
+            mParent->i_setModifiedLock(Machine::IsModified_NetworkAdapters);
+            mParent->i_onNetworkAdapterChange(this, TRUE);
         }
     }
@@ -846,9 +846,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* Adapt the CFGM logic changeAdapter=TRUE */
-        mParent->onNetworkAdapterChange(this, TRUE);
+        mParent->i_onNetworkAdapterChange(this, TRUE);
     }
 
@@ -884,9 +884,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* No change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -930,9 +930,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, no need to lock
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* No change in CFGM logic => changeAdapter=FALSE. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -981,5 +981,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
@@ -988,5 +988,5 @@
         adep.release();
 
-        mParent->onNetworkAdapterChange(this, fGenericChange);
+        mParent->i_onNetworkAdapterChange(this, fGenericChange);
     }
 
@@ -1303,5 +1303,5 @@
     {
         ComObjPtr<BandwidthGroup> pBwGroup;
-        hrc = mParent->getBandwidthGroup(mData->mBandwidthGroup, pBwGroup, true /* fSetError */);
+        hrc = mParent->i_getBandwidthGroup(mData->mBandwidthGroup, pBwGroup, true /* fSetError */);
 
         Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence
@@ -1335,5 +1335,5 @@
         if (!strBwGroup.isEmpty())
         {
-            HRESULT hrc = mParent->getBandwidthGroup(strBwGroup, pBwGroup, false /* fSetError */);
+            HRESULT hrc = mParent->i_getBandwidthGroup(strBwGroup, pBwGroup, false /* fSetError */);
             NOREF(hrc);
             Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence
@@ -1348,9 +1348,9 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
-        mParent->setModified(Machine::IsModified_NetworkAdapters);
+        mParent->i_setModified(Machine::IsModified_NetworkAdapters);
         mlock.release();
 
         /* TODO: changeAdapter=???. */
-        mParent->onNetworkAdapterChange(this, FALSE);
+        mParent->i_onNetworkAdapterChange(this, FALSE);
     }
 
@@ -1367,5 +1367,5 @@
     if (!mData->mBandwidthGroup.isEmpty())
         {
-            HRESULT hrc = mParent->getBandwidthGroup(mData->mBandwidthGroup, pOldBwGroup, false /* fSetError */);
+            HRESULT hrc = mParent->i_getBandwidthGroup(mData->mBandwidthGroup, pOldBwGroup, false /* fSetError */);
             NOREF(hrc);
             Assert(SUCCEEDED(hrc)); /* This is not allowed to fail because the existence of
@@ -1405,5 +1405,5 @@
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
         LogRel(("VM '%ls' stops using NAT network '%s'\n", bstrName.raw(), networkName.c_str()));
-        int natCount = mParent->getVirtualBox()->i_natNetworkRefDec(Bstr(networkName).raw());
+        int natCount = mParent->i_getVirtualBox()->i_natNetworkRefDec(Bstr(networkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* no such network */
@@ -1428,5 +1428,5 @@
         hrc = mParent->COMGETTER(Name)(bstrName.asOutParam());
         LogRel(("VM '%ls' starts using NAT network '%s'\n", bstrName.raw(), aNatNetworkName.c_str()));
-        int natCount = mParent->getVirtualBox()->i_natNetworkRefInc(Bstr(aNatNetworkName).raw());
+        int natCount = mParent->i_getVirtualBox()->i_natNetworkRefInc(Bstr(aNatNetworkName).raw());
         if (natCount == -1)
             return E_INVALIDARG; /* not found */
Index: /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/ParallelPortImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -229,8 +229,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_ParallelPorts);
+        m->pMachine->i_setModified(Machine::IsModified_ParallelPorts);
         mlock.release();
 
-        m->pMachine->onParallelPortChange(this);
+        m->pMachine->i_onParallelPortChange(this);
     }
 
@@ -281,8 +281,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_ParallelPorts);
+        m->pMachine->i_setModified(Machine::IsModified_ParallelPorts);
         mlock.release();
 
-        m->pMachine->onParallelPortChange(this);
+        m->pMachine->i_onParallelPortChange(this);
     }
 
@@ -324,8 +324,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_ParallelPorts);
+        m->pMachine->i_setModified(Machine::IsModified_ParallelPorts);
         mlock.release();
 
-        m->pMachine->onParallelPortChange(this);
+        m->pMachine->i_onParallelPortChange(this);
     }
 
@@ -364,8 +364,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_ParallelPorts);
+        m->pMachine->i_setModified(Machine::IsModified_ParallelPorts);
         mlock.release();
 
-        return m->pMachine->onParallelPortChange(this);
+        return m->pMachine->i_onParallelPortChange(this);
     }
 
Index: /trunk/src/VBox/Main/src-server/Performance.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/Performance.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/Performance.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -260,5 +260,5 @@
         ComPtr<IInternalSessionControl> directControl;
 
-        ret = mMachine->getDirectControl(&directControl);
+        ret = mMachine->i_getDirectControl(&directControl);
         if (ret != S_OK)
             return ret;
@@ -302,9 +302,9 @@
         if (FAILED(autoCaller.rc())) return autoCaller.rc();
 
-        mMachineName = mMachine->getName();
+        mMachineName = mMachine->i_getName();
 
         ComPtr<IInternalSessionControl> directControl;
 
-        ret = mMachine->getDirectControl(&directControl);
+        ret = mMachine->i_getDirectControl(&directControl);
         if (ret != S_OK)
             return ret;
Index: /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/SerialPortImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -206,8 +206,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
@@ -270,8 +270,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
@@ -324,8 +324,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
@@ -373,8 +373,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
@@ -413,8 +413,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
@@ -449,8 +449,8 @@
 
         AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS);
-        m->pMachine->setModified(Machine::IsModified_SerialPorts);
+        m->pMachine->i_setModified(Machine::IsModified_SerialPorts);
         mlock.release();
 
-        m->pMachine->onSerialPortChange(this);
+        m->pMachine->i_onSerialPortChange(this);
     }
 
Index: /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/SnapshotImpl.cpp	(revision 51498)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -329,5 +329,5 @@
         m->strName = aName;
         alock.release(); /* Important! (child->parent locks are forbidden) */
-        rc = m->pMachine->onSnapshotChange(this);
+        rc = m->pMachine->i_onSnapshotChange(this);
     }
 
@@ -351,5 +351,5 @@
         m->strDescription = aDescription;
         alock.release(); /* Important! (child->parent locks are forbidden) */
-        rc = m->pMachine->onSnapshotChange(this);
+        rc = m->pMachine->i_onSnapshotChange(this);
     }
 
@@ -746,12 +746,12 @@
     // state file (only if this snapshot is online)
     if (i_getStateFilePath().isNotEmpty())
-        m->pMachine->copyPathRelativeToMachine(i_getStateFilePath(), data.strStateFile);
+        m->pMachine->i_copyPathRelativeToMachine(i_getStateFilePath(), data.strStateFile);
     else
         data.strStateFile.setNull();
 
-    HRESULT rc = m->pMachine->saveHardware(data.hardware, &data.debugging, &data.autostart);
+    HRESULT rc = m->pMachine->i_saveHardware(data.hardware, &data.debugging, &data.autostart);
     if (FAILED(rc)) return rc;
 
-    rc = m->pMachine->saveStorageControllers(data.storage);
+    rc = m->pMachine->i_saveStorageControllers(data.storage);
     if (FAILED(rc)) return rc;
 
@@ -858,8 +858,8 @@
 
     // now call detachAllMedia on the snapshot machine
-    rc = m->pMachine->detachAllMedia(writeLock,
-                                     this /* pSnapshot */,
-                                     cleanupMode,
-                                     llMedia);
+    rc = m->pMachine->i_detachAllMedia(writeLock,
+                                       this /* pSnapshot */,
+                                       cleanupMode,
+                                       llMedia);
     if (FAILED(rc))
         return rc;
@@ -1168,13 +1168,13 @@
     /* load hardware and harddisk settings */
 
-    HRESULT rc = loadHardware(hardware, pDbg, pAutostart);
+    HRESULT rc = i_loadHardware(hardware, pDbg, pAutostart);
     if (SUCCEEDED(rc))
-        rc = loadStorageControllers(storage,
-                                    NULL, /* puuidRegistry */
-                                    &mSnapshotId);
+        rc = i_loadStorageControllers(storage,
+                                      NULL, /* puuidRegistry */
+                                      &mSnapshotId);
 
     if (SUCCEEDED(rc))
         /* commit all changes made during the initialization */
-        commit();   /// @todo r=dj why do we need a commit in init?!? this is very expensive
+        i_commit();   /// @todo r=dj why do we need a commit in init?!? this is very expensive
         /// @todo r=klaus for some reason the settings loading logic backs up
         // the settings, and therefore a commit is needed. Should probably be changed.
@@ -1234,5 +1234,5 @@
  *  @warning Caller must hold no locks when calling this.
  */
-HRESULT SnapshotMachine::onSnapshotChange(Snapshot *aSnapshot)
+HRESULT SnapshotMachine::i_onSnapshotChange(Snapshot *aSnapshot)
 {
     AutoMultiWriteLock2 mlock(this, aSnapshot COMMA_LOCKVAL_SRC_POS);
@@ -1244,7 +1244,7 @@
      * modification of the current state flag, cause this snapshot data isn't
      * related to the current state. */
-    mMachine->setModified(Machine::IsModified_Snapshots, false /* fAllowStateModification */);
-    HRESULT rc = mMachine->saveSettings(&fNeedsGlobalSaveSettings,
-                                        SaveS_Force);        // we know we need saving, no need to check
+    mMachine->i_setModified(Machine::IsModified_Snapshots, false /* fAllowStateModification */);
+    HRESULT rc = mMachine->i_saveSettings(&fNeedsGlobalSaveSettings,
+                                          SaveS_Force);        // we know we need saving, no need to check
     mlock.release();
 
@@ -1312,5 +1312,5 @@
     void handler()
     {
-        pMachine->restoreSnapshotHandler(*this);
+        pMachine->i_restoreSnapshotHandler(*this);
     }
 };
@@ -1330,5 +1330,5 @@
     void handler()
     {
-        pMachine->deleteSnapshotHandler(*this);
+        pMachine->i_deleteSnapshotHandler(*this);
     }
 
@@ -1434,5 +1434,5 @@
         /* save all current settings to ensure current changes are committed and
          * hard disks are fixed up */
-        HRESULT rc = saveSettings(NULL);
+        HRESULT rc = i_saveSettings(NULL);
                 // no need to check for whether VirtualBox.xml needs changing since
                 // we can't have a machine XML rename pending at this point
@@ -1454,5 +1454,5 @@
         {
             // creating a new online snapshot: we need a fresh saved state file
-            composeSavedStateFilename(strStateFilePath);
+            i_composeSavedStateFilename(strStateFilePath);
         }
     }
@@ -1502,18 +1502,18 @@
         // backup the media data so we can recover if things goes wrong along the day;
         // the matching commit() is in fixupMedia() during endSnapshot()
-        setModified(IsModified_Storage);
+        i_setModified(IsModified_Storage);
         mMediaData.backup();
 
         /* Console::fntTakeSnapshotWorker and friends expects this. */
         if (mConsoleTaskData.mLastState == MachineState_Running)
-            setMachineState(MachineState_LiveSnapshotting);
+            i_setMachineState(MachineState_LiveSnapshotting);
         else
-            setMachineState(MachineState_Saving); /** @todo Confusing! Saving is used for both online and offline snapshots. */
+            i_setMachineState(MachineState_Saving); /** @todo Confusing! Saving is used for both online and offline snapshots. */
 
         alock.release();
         /* create new differencing hard disks and attach them to this machine */
-        rc = createImplicitDiffs(aConsoleProgress,
-                                 1,            // operation weight; must be the same as in Console::TakeSnapshot()
-                                 !!fTakingSnapshotOnline);
+        rc = i_createImplicitDiffs(aConsoleProgress,
+                                   1,            // operation weight; must be the same as in Console::TakeSnapshot()
+                                   !!fTakingSnapshotOnline);
         if (FAILED(rc))
             throw rc;
@@ -1531,5 +1531,5 @@
                   : mData->mMachineState == MachineState_Saving)
            )
-            setMachineState(mConsoleTaskData.mLastState);
+               i_setMachineState(mConsoleTaskData.mLastState);
 
         pSnapshot->uninit();
@@ -1592,5 +1592,5 @@
          && mConsoleTaskData.mLastState != MachineState_Running
        )
-        setMachineState(mConsoleTaskData.mLastState);
+           i_setMachineState(mConsoleTaskData.mLastState);
 
     ComObjPtr<Snapshot> pOldFirstSnap = mData->mFirstSnapshot;
@@ -1617,5 +1617,5 @@
             flSaveSettings |= SaveS_ResetCurStateModified;
 
-        rc = saveSettings(NULL, flSaveSettings);
+        rc = i_saveSettings(NULL, flSaveSettings);
     }
 
@@ -1623,5 +1623,5 @@
     {
         /* associate old hard disks with the snapshot and do locking/unlocking*/
-        commitMedia(fOnline);
+        i_commitMedia(fOnline);
 
         /* inform callbacks */
@@ -1636,5 +1636,5 @@
         machineLock.release();
 
-        rollbackMedia();
+        i_rollbackMedia();
 
         mData->mFirstSnapshot = pOldFirstSnap;      // might have been changed above
@@ -1766,5 +1766,5 @@
 
     /* set the proper machine state (note: after creating a Task instance) */
-    setMachineState(MachineState_RestoringSnapshot);
+    i_setMachineState(MachineState_RestoringSnapshot);
 
     /* return the progress to the caller */
@@ -1791,5 +1791,5 @@
  * @param aTask Task data.
  */
-void SessionMachine::restoreSnapshotHandler(RestoreSnapshotTask &aTask)
+void SessionMachine::i_restoreSnapshotHandler(RestoreSnapshotTask &aTask)
 {
     LogFlowThisFuncEnter();
@@ -1823,5 +1823,5 @@
          * the direct session. */
         if (mData->flModifications)
-            rollback(false /* aNotify */);
+            i_rollback(false /* aNotify */);
 
         /* Delete the saved state file if the machine was Saved prior to this
@@ -1835,9 +1835,9 @@
             Utf8Str strStateFile(mSSData->strStateFilePath);
             mSSData->strStateFilePath.setNull();
-            releaseSavedStateFile(strStateFile, NULL /* pSnapshotToIgnore */ );
+            i_releaseSavedStateFile(strStateFile, NULL /* pSnapshotToIgnore */ );
 
             aTask.modifyBackedUpState(MachineState_PoweredOff);
 
-            rc = saveStateSettings(SaveSTS_StateFilePath);
+            rc = i_saveStateSettings(SaveSTS_StateFilePath);
             if (FAILED(rc))
                 throw rc;
@@ -1856,10 +1856,10 @@
 
             /* copy all hardware data from the snapshot */
-            copyFrom(pSnapshotMachine);
+            i_copyFrom(pSnapshotMachine);
 
             LogFlowThisFunc(("Restoring hard disks from the snapshot...\n"));
 
             // restore the attachments from the snapshot
-            setModified(IsModified_Storage);
+            i_setModified(IsModified_Storage);
             mMediaData.backup();
             mMediaData->mAttachments.clear();
@@ -1878,7 +1878,7 @@
             alock.release();
 
-            rc = createImplicitDiffs(aTask.pProgress,
-                                     1,
-                                     false /* aOnline */);
+            rc = i_createImplicitDiffs(aTask.pProgress,
+                                       1,
+                                       false /* aOnline */);
             if (FAILED(rc))
                 throw rc;
@@ -1934,9 +1934,9 @@
          * state accordingly no matter of the delete snapshot result */
         if (mSSData->strStateFilePath.isNotEmpty())
-            setMachineState(MachineState_Saved);
+            i_setMachineState(MachineState_Saved);
         else
-            setMachineState(MachineState_PoweredOff);
-
-        updateMachineStateOnClient();
+            i_setMachineState(MachineState_PoweredOff);
+
+        i_updateMachineStateOnClient();
         stateRestored = true;
 
@@ -1986,6 +1986,6 @@
         // save machine settings, reset the modified flag and commit;
         bool fNeedsGlobalSaveSettings = false;
-        rc = saveSettings(&fNeedsGlobalSaveSettings,
-                          SaveS_ResetCurStateModified);
+        rc = i_saveSettings(&fNeedsGlobalSaveSettings,
+                            SaveS_ResetCurStateModified);
         if (FAILED(rc))
             throw rc;
@@ -2025,11 +2025,11 @@
 
         /* undo all changes on failure */
-        rollback(false /* aNotify */);
+        i_rollback(false /* aNotify */);
 
         if (!stateRestored)
         {
             /* restore the machine state */
-            setMachineState(aTask.machineStateBackup);
-            updateMachineStateOnClient();
+            i_setMachineState(aTask.machineStateBackup);
+            i_updateMachineStateOnClient();
         }
     }
@@ -2108,5 +2108,5 @@
 
     ComObjPtr<Snapshot> pSnapshot;
-    HRESULT rc = findSnapshotById(startId, pSnapshot, true /* aSetError */);
+    HRESULT rc = i_findSnapshotById(startId, pSnapshot, true /* aSetError */);
     if (FAILED(rc)) return rc;
 
@@ -2135,5 +2135,5 @@
         if (mData->flModifications)
         {
-            rc = saveSettings(NULL);
+            rc = i_saveSettings(NULL);
                 // no need to change for whether VirtualBox.xml needs saving since
                 // we can't have a machine XML rename pending at this point
@@ -2219,9 +2219,9 @@
     // set the proper machine state here now (note: after creating a Task instance)
     if (mData->mMachineState == MachineState_Running)
-        setMachineState(MachineState_DeletingSnapshotOnline);
+        i_setMachineState(MachineState_DeletingSnapshotOnline);
     else if (mData->mMachineState == MachineState_Paused)
-        setMachineState(MachineState_DeletingSnapshotPaused);
+        i_setMachineState(MachineState_DeletingSnapshotPaused);
     else
-        setMachineState(MachineState_DeletingSnapshot);
+        i_setMachineState(MachineState_DeletingSnapshot);
 
     /* return the progress to the caller */
@@ -2332,5 +2332,5 @@
  */
 
-void SessionMachine::deleteSnapshotHandler(DeleteSnapshotTask &aTask)
+void SessionMachine::i_deleteSnapshotHandler(DeleteSnapshotTask &aTask)
 {
     LogFlowThisFuncEnter();
@@ -2369,5 +2369,5 @@
         ComObjPtr<SnapshotMachine> pSnapMachine = aTask.pSnapshot->i_getSnapshotMachine();
         // no need to lock the snapshot machine since it is const by definition
-        Guid machineId = pSnapMachine->getId();
+        Guid machineId = pSnapMachine->i_getId();
 
         // save the snapshot ID (for callbacks)
@@ -2429,8 +2429,8 @@
                 // prevent online merging in general.
                 pOnlineMediumAttachment =
-                    findAttachment(mMediaData->mAttachments,
-                                   pAttach->i_getControllerName().raw(),
-                                   pAttach->i_getPort(),
-                                   pAttach->i_getDevice());
+                    i_findAttachment(mMediaData->mAttachments,
+                                     pAttach->i_getControllerName().raw(),
+                                     pAttach->i_getPort(),
+                                     pAttach->i_getDevice());
                 if (pOnlineMediumAttachment)
                 {
@@ -2448,12 +2448,12 @@
 
             treeLock.release();
-            rc = prepareDeleteSnapshotMedium(pHD, machineId, snapshotId,
-                                             fOnlineMergePossible,
-                                             pVMMALockList, pSource, pTarget,
-                                             fMergeForward, pParentForTarget,
-                                             pChildrenToReparent,
-                                             fNeedsOnlineMerge,
-                                             pMediumLockList,
-                                             pHDLockToken);
+            rc = i_prepareDeleteSnapshotMedium(pHD, machineId, snapshotId,
+                                               fOnlineMergePossible,
+                                               pVMMALockList, pSource, pTarget,
+                                               fMergeForward, pParentForTarget,
+                                               pChildrenToReparent,
+                                               fNeedsOnlineMerge,
+                                               pMediumLockList,
+                                               pHDLockToken);
             treeLock.acquire();
             if (FAILED(rc))
@@ -2660,9 +2660,9 @@
                                                   1);        // weight
 
-                releaseSavedStateFile(stateFilePath, aTask.pSnapshot /* pSnapshotToIgnore */);
+                i_releaseSavedStateFile(stateFilePath, aTask.pSnapshot /* pSnapshotToIgnore */);
 
                 // machine will need saving now
                 machineLock.release();
-                mParent->i_markRegistryModified(getId());
+                mParent->i_markRegistryModified(i_getId());
             }
         }
@@ -2730,13 +2730,13 @@
                     mConsoleTaskData.mDeleteSnapshotInfo = (void *)&(*it);
                     // online medium merge, in the direction decided earlier
-                    rc = onlineMergeMedium(it->mpOnlineMediumAttachment,
-                                           it->mpSource,
-                                           it->mpTarget,
-                                           it->mfMergeForward,
-                                           it->mpParentForTarget,
-                                           it->mpChildrenToReparent,
-                                           it->mpMediumLockList,
-                                           aTask.pProgress,
-                                           &fNeedsSave);
+                    rc = i_onlineMergeMedium(it->mpOnlineMediumAttachment,
+                                             it->mpSource,
+                                             it->mpTarget,
+                                             it->mfMergeForward,
+                                             it->mpParentForTarget,
+                                             it->mpChildrenToReparent,
+                                             it->mpMediumLockList,
+                                             aTask.pProgress,
+                                             &fNeedsSave);
                     mConsoleTaskData.mDeleteSnapshotInfo = NULL;
                 }
@@ -2799,11 +2799,11 @@
             if (fReparentTarget)
             {
-                pAtt = findAttachment(pSnapMachine->mMediaData->mAttachments,
-                                      it->mpTarget);
+                pAtt = i_findAttachment(pSnapMachine->mMediaData->mAttachments,
+                                        it->mpTarget);
                 it->mpTarget->i_removeBackReference(machineId, snapshotId);
             }
             else
-                pAtt = findAttachment(pSnapMachine->mMediaData->mAttachments,
-                                      it->mpSource);
+                pAtt = i_findAttachment(pSnapMachine->mMediaData->mAttachments,
+                                        it->mpSource);
             pSnapMachine->mMediaData->mAttachments.remove(pAtt);
 
@@ -2820,5 +2820,5 @@
                     childSnapshotId = pChildSnapshot->i_getId();
                 }
-                pAtt = findAttachment(pMachine->mMediaData->mAttachments, it->mpSource);
+                pAtt = i_findAttachment(pMachine->mMediaData->mAttachments, it->mpSource);
                 if (pAtt)
                 {
@@ -2843,5 +2843,5 @@
 
             // One attachment is merged, must save the settings
-            mParent->i_markRegistryModified(getId());
+            mParent->i_markRegistryModified(i_getId());
 
             // prevent calling cancelDeleteSnapshotMedium() for this attachment
@@ -2863,5 +2863,5 @@
 
             machineLock.release();
-            mParent->i_markRegistryModified(getId());
+            mParent->i_markRegistryModified(i_getId());
         }
     }
@@ -2884,11 +2884,9 @@
              it != toDelete.end();
              ++it)
-        {
-            cancelDeleteSnapshotMedium(it->mpHD, it->mpSource,
-                                       it->mpChildrenToReparent,
-                                       it->mfNeedsOnlineMerge,
-                                       it->mpMediumLockList, it->mpHDLockToken,
-                                       it->mMachineId, it->mSnapshotId);
-        }
+            i_cancelDeleteSnapshotMedium(it->mpHD, it->mpSource,
+                                         it->mpChildrenToReparent,
+                                         it->mfNeedsOnlineMerge,
+                                         it->mpMediumLockList, it->mpHDLockToken,
+                                         it->mMachineId, it->mSnapshotId);
     }
 
@@ -2902,6 +2900,6 @@
         // restore the machine state that was saved when the
         // task was started
-        setMachineState(aTask.machineStateBackup);
-        updateMachineStateOnClient();
+        i_setMachineState(aTask.machineStateBackup);
+        i_updateMachineStateOnClient();
 
         mParent->i_saveModifiedRegistries();
@@ -2954,17 +2952,17 @@
  *       and every medium object on the merge chain for writing.
  */
-HRESULT SessionMachine::prepareDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
-                                                    const Guid &aMachineId,
-                                                    const Guid &aSnapshotId,
-                                                    bool fOnlineMergePossible,
-                                                    MediumLockList *aVMMALockList,
-                                                    ComObjPtr<Medium> &aSource,
-                                                    ComObjPtr<Medium> &aTarget,
-                                                    bool &aMergeForward,
-                                                    ComObjPtr<Medium> &aParentForTarget,
-                                                    MediumLockList * &aChildrenToReparent,
-                                                    bool &fNeedsOnlineMerge,
-                                                    MediumLockList * &aMediumLockList,
-                                                    ComPtr<IToken> &aHDLockToken)
+HRESULT SessionMachine::i_prepareDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
+                                                      const Guid &aMachineId,
+                                                      const Guid &aSnapshotId,
+                                                      bool fOnlineMergePossible,
+                                                      MediumLockList *aVMMALockList,
+                                                      ComObjPtr<Medium> &aSource,
+                                                      ComObjPtr<Medium> &aTarget,
+                                                      bool &aMergeForward,
+                                                      ComObjPtr<Medium> &aParentForTarget,
+                                                      MediumLockList * &aChildrenToReparent,
+                                                      bool &fNeedsOnlineMerge,
+                                                      MediumLockList * &aMediumLockList,
+                                                      ComPtr<IToken> &aHDLockToken)
 {
     Assert(!mParent->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread());
@@ -3247,12 +3245,12 @@
  * @note Locks the medium tree and the hard disks in the chain for writing.
  */
-void SessionMachine::cancelDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
-                                                const ComObjPtr<Medium> &aSource,
-                                                MediumLockList *aChildrenToReparent,
-                                                bool fNeedsOnlineMerge,
-                                                MediumLockList *aMediumLockList,
-                                                const ComPtr<IToken> &aHDLockToken,
-                                                const Guid &aMachineId,
-                                                const Guid &aSnapshotId)
+void SessionMachine::i_cancelDeleteSnapshotMedium(const ComObjPtr<Medium> &aHD,
+                                                  const ComObjPtr<Medium> &aSource,
+                                                  MediumLockList *aChildrenToReparent,
+                                                  bool fNeedsOnlineMerge,
+                                                  MediumLockList *aMediumLockList,
+                                                  const ComPtr<IToken> &aHDLockToken,
+                                                  const Guid &aMachineId,
+                                                  const Guid &aSnapshotId)
 {
     if (aMediumLockList == NULL)
@@ -3343,13 +3341,13 @@
  * @param pfNeedsMachineSaveSettings Whether the VM settings need to be saved (out).
  */
-HRESULT SessionMachine::onlineMergeMedium(const ComObjPtr<MediumAttachment> &aMediumAttachment,
-                                          const ComObjPtr<Medium> &aSource,
-                                          const ComObjPtr<Medium> &aTarget,
-                                          bool fMergeForward,
-                                          const ComObjPtr<Medium> &aParentForTarget,
-                                          MediumLockList *aChildrenToReparent,
-                                          MediumLockList *aMediumLockList,
-                                          ComObjPtr<Progress> &aProgress,
-                                          bool *pfNeedsMachineSaveSettings)
+HRESULT SessionMachine::i_onlineMergeMedium(const ComObjPtr<MediumAttachment> &aMediumAttachment,
+                                            const ComObjPtr<Medium> &aSource,
+                                            const ComObjPtr<Medium> &aTarget,
+                                            bool fMergeForward,
+                                            const ComObjPtr<Medium> &aParentForTarget,
+                                            MediumLockList *aChildrenToReparent,
+                                            MediumLockList *aMediumLockList,
+                                            ComObjPtr<Progress> &aProgress,
+                                            bool *pfNeedsMachineSaveSettings)
 {
     AssertReturn(aSource != NULL, E_FAIL);
Index: /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp	(revision 51498)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2008-2013 Oracle Corporation
+ * Copyright (C) 2008-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -90,5 +90,5 @@
           pParent(aMachine)
     {
-        unconst(pVirtualBox) = aMachine->getVirtualBox();
+        unconst(pVirtualBox) = aMachine->i_getVirtualBox();
         unconst(pSystemProperties) = pVirtualBox->i_getSystemProperties();
     }
@@ -147,5 +147,6 @@
     if (FAILED(rc))
         return rc;
-    rc = aParent->getVirtualBox()->i_getSystemProperties()->GetMaxInstancesOfStorageBus(chipsetType, aStorageBus, &maxInstances);
+    rc = aParent->i_getVirtualBox()->i_getSystemProperties()->
+        GetMaxInstancesOfStorageBus(chipsetType, aStorageBus, &maxInstances);
     if (FAILED(rc))
         return rc;
@@ -544,8 +545,8 @@
         alock.release();
         AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS);        // m->pParent is const, needs no locking
-        m->pParent->setModified(Machine::IsModified_Storage);
+        m->pParent->i_setModified(Machine::IsModified_Storage);
         mlock.release();
 
-        m->pParent->onStorageControllerChange();
+        m->pParent->i_onStorageControllerChange();
     }
 
@@ -601,8 +602,8 @@
         alock.release();
         AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS);        // m->pParent is const, needs no locking
-        m->pParent->setModified(Machine::IsModified_Storage);
+        m->pParent->i_setModified(Machine::IsModified_Storage);
         mlock.release();
 
-        m->pParent->onStorageControllerChange();
+        m->pParent->i_onStorageControllerChange();
     }
 
Index: /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFilterImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -471,5 +471,5 @@
 
         AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-        pMachine->setModified(Machine::IsModified_USB);
+        pMachine->i_setModified(Machine::IsModified_USB);
         mlock.release();
 
@@ -509,5 +509,5 @@
 
         AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-        pMachine->setModified(Machine::IsModified_USB);
+        pMachine->i_setModified(Machine::IsModified_USB);
         mlock.release();
 
@@ -625,5 +625,5 @@
 
         AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-        pMachine->setModified(Machine::IsModified_USB);
+        pMachine->i_setModified(Machine::IsModified_USB);
         mlock.release();
 
@@ -662,5 +662,5 @@
 
         AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-        pMachine->setModified(Machine::IsModified_USB);
+        pMachine->i_setModified(Machine::IsModified_USB);
         mlock.release();
 
@@ -814,5 +814,5 @@
 
         AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-        pMachine->setModified(Machine::IsModified_USB);
+        pMachine->i_setModified(Machine::IsModified_USB);
         mlock.release();
 
@@ -987,5 +987,5 @@
  * to be our parent.
  */
-RWLockHandle *HostUSBDeviceFilter::i_lockHandle() const
+RWLockHandle *HostUSBDeviceFilter::lockHandle() const
 {
     return mParent->lockHandle();
Index: /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/USBDeviceFiltersImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2005-2013 Oracle Corporation
+ * Copyright (C) 2005-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -51,5 +51,5 @@
     Data(Machine *pMachine)
         : pParent(pMachine),
-          pHost(pMachine->getVirtualBox()->i_host())
+          pHost(pMachine->i_getVirtualBox()->i_host())
     { }
 
@@ -389,5 +389,5 @@
     alock.release();
     AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS);
-    m->pParent->setModified(Machine::IsModified_USB);
+    m->pParent->i_setModified(Machine::IsModified_USB);
     mlock.release();
 
@@ -456,5 +456,5 @@
     alock.release();
     AutoWriteLock mlock(m->pParent COMMA_LOCKVAL_SRC_POS);
-    m->pParent->setModified(Machine::IsModified_USB);
+    m->pParent->i_setModified(Machine::IsModified_USB);
     mlock.release();
 
@@ -826,5 +826,5 @@
 
     if (    aFilter->mInList
-         && m->pParent->isRegistered())
+         && m->pParent->i_isRegistered())
     {
         USBProxyService *pProxySvc = m->pHost->i_usbProxyService();
@@ -881,5 +881,5 @@
 
     /* It is not possible to work with USB device if there is no USB controller present. */
-    if (!m->pParent->isUSBControllerPresent())
+    if (!m->pParent->i_isUSBControllerPresent())
         return false;
 
@@ -922,5 +922,5 @@
 
     /* It is not possible to work with USB device if there is no USB controller present. */
-    if (!m->pParent->isUSBControllerPresent())
+    if (!m->pParent->i_isUSBControllerPresent())
         return false;
 
Index: /trunk/src/VBox/Main/src-server/USBProxyService.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/USBProxyService.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -211,5 +211,5 @@
     LogFlowThisFunc(("aMachine=%p{%s} aId={%RTuuid} aDone=%RTbool\n",
                      aMachine,
-                     aMachine->getName().c_str(),
+                     aMachine->i_getName().c_str(),
                      Guid(aId).raw(),
                      aDone));
@@ -274,5 +274,5 @@
     LogFlowThisFunc(("aMachine=%p{%s}\n",
                      aMachine,
-                     aMachine->getName().c_str()));
+                     aMachine->i_getName().c_str()));
 
     /*
@@ -524,5 +524,5 @@
      */
     ULONG ulMaskedIfs;
-    if (aMachine->hasMatchingUSBFilter(aDevice, &ulMaskedIfs))
+    if (aMachine->i_hasMatchingUSBFilter(aDevice, &ulMaskedIfs))
     {
         /* try to capture the device */
Index: /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/VRDEServerImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -274,11 +274,11 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */
+        /* Avoid deadlock when i_onVRDEServerChange eventually calls SetExtraData. */
         adep.release();
 
-        rc = mParent->onVRDEServerChange(/* aRestart */ TRUE);
+        rc = mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
     }
 
@@ -404,11 +404,11 @@
 
             AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-            mParent->setModified(Machine::IsModified_VRDEServer);
+            mParent->i_setModified(Machine::IsModified_VRDEServer);
             mlock.release();
 
-            /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */
+            /* Avoid deadlock when i_onVRDEServerChange eventually calls SetExtraData. */
             adep.release();
 
-            mParent->onVRDEServerChange(/* aRestart */ TRUE);
+            mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
         }
     }
@@ -435,11 +435,11 @@
 
             AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
-            mParent->setModified(Machine::IsModified_VRDEServer);
+            mParent->i_setModified(Machine::IsModified_VRDEServer);
             mlock.release();
 
-            /* Avoid deadlock when onVRDEServerChange eventually calls SetExtraData. */
+            /* Avoid deadlock when i_onVRDEServerChange eventually calls SetExtraData. */
             adep.release();
 
-            mParent->onVRDEServerChange(/* aRestart */ TRUE);
+            mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
         }
     }
@@ -536,5 +536,5 @@
     {
 #ifdef VBOX_WITH_EXTPACK
-        VirtualBox *pVirtualBox = mParent->getVirtualBox();
+        VirtualBox *pVirtualBox = mParent->i_getVirtualBox();
         ExtPackManager *pExtPackMgr = pVirtualBox->i_getExtPackManager();
         vrc = pExtPackMgr->i_getVrdeLibraryPathForExtPack(&strExtPack, &strVrdeLibrary);
@@ -618,8 +618,8 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->onVRDEServerChange(/* aRestart */ TRUE);
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
     }
 
@@ -654,5 +654,5 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
@@ -677,5 +677,5 @@
         /* Get the global setting. */
         ComPtr<ISystemProperties> systemProperties;
-        HRESULT hrc = mParent->getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
+        HRESULT hrc = mParent->i_getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
         if (SUCCEEDED(hrc))
         {
@@ -711,8 +711,8 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->onVRDEServerChange(/* aRestart */ TRUE);
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
     }
 
@@ -748,8 +748,8 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->onVRDEServerChange(/* aRestart */ TRUE); // @todo does it need a restart?
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); // @todo does it need a restart?
     }
 
@@ -783,8 +783,8 @@
 
         AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
+        mParent->i_setModified(Machine::IsModified_VRDEServer);
         mlock.release();
 
-        mParent->onVRDEServerChange(/* aRestart */ TRUE); // @todo needs a restart?
+        mParent->i_onVRDEServerChange(/* aRestart */ TRUE); // @todo needs a restart?
     }
 
@@ -806,5 +806,5 @@
         {
 #ifdef VBOX_WITH_EXTPACK
-            ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager();
+            ExtPackManager *pExtPackMgr = mParent->i_getVirtualBox()->i_getExtPackManager();
             hrc = pExtPackMgr->i_checkVrdeExtPack(&strExtPack);
 #else
@@ -819,5 +819,5 @@
         /* Get the global setting. */
         ComPtr<ISystemProperties> systemProperties;
-        hrc = mParent->getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
+        hrc = mParent->i_getVirtualBox()->COMGETTER(SystemProperties)(systemProperties.asOutParam());
         if (SUCCEEDED(hrc))
         {
@@ -851,5 +851,5 @@
             {
 #ifdef VBOX_WITH_EXTPACK
-                ExtPackManager *pExtPackMgr = mParent->getVirtualBox()->i_getExtPackManager();
+                ExtPackManager *pExtPackMgr = mParent->i_getVirtualBox()->i_getExtPackManager();
                 hrc = pExtPackMgr->i_checkVrdeExtPack(&aExtPack);
 #else
@@ -874,8 +874,8 @@
 
                 AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);
-                mParent->setModified(Machine::IsModified_VRDEServer);
+                mParent->i_setModified(Machine::IsModified_VRDEServer);
                 mlock.release();
 
-                mParent->onVRDEServerChange(/* aRestart */ TRUE);
+                mParent->i_onVRDEServerChange(/* aRestart */ TRUE);
             }
         }
Index: /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 51498)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2013 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -921,7 +921,7 @@
         AutoReadLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
 
-        if (pMachine->isAccessible())
-        {
-            const StringsList &thisGroups = pMachine->getGroups();
+        if (pMachine->i_isAccessible())
+        {
+            const StringsList &thisGroups = pMachine->i_getGroups();
             for (StringsList::const_iterator it2 = thisGroups.begin();
                  it2 != thisGroups.end(); ++it2)
@@ -1091,7 +1091,7 @@
         AutoReadLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
 
-        if (pMachine->isAccessible())
-        {
-            uint32_t cNetworkAdapters = Global::getMaxNetworkAdapters(pMachine->getChipsetType());
+        if (pMachine->i_isAccessible())
+        {
+            uint32_t cNetworkAdapters = Global::getMaxNetworkAdapters(pMachine->i_getChipsetType());
             for (ULONG i = 0; i < cNetworkAdapters; i++)
             {
@@ -1142,7 +1142,7 @@
         AutoReadLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
 
-        if (pMachine->isAccessible())
-        {
-            uint32_t cNetworkAdapters = Global::getMaxNetworkAdapters(pMachine->getChipsetType());
+        if (pMachine->i_isAccessible())
+        {
+            uint32_t cNetworkAdapters = Global::getMaxNetworkAdapters(pMachine->i_getChipsetType());
             for (ULONG i = 0; i < cNetworkAdapters; i++)
             {
@@ -1610,5 +1610,5 @@
     /* fire an event */
     if (SUCCEEDED(rc))
-        i_onMachineRegistered(pMachine->getId(), TRUE);
+        i_onMachineRegistered(pMachine->i_getId(), TRUE);
 
     return rc;
@@ -1680,7 +1680,7 @@
         AutoReadLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
 
-        if (pMachine->isAccessible())
-        {
-            const StringsList &thisGroups = pMachine->getGroups();
+        if (pMachine->i_isAccessible())
+        {
+            const StringsList &thisGroups = pMachine->i_getGroups();
             for (StringsList::const_iterator it2 = thisGroups.begin();
                  it2 != thisGroups.end();
@@ -2986,5 +2986,5 @@
         ComObjPtr<SessionMachine> sm;
         ComPtr<IInternalSessionControl> ctl;
-        if ((*it)->isSessionOpen(sm, &ctl))
+        if ((*it)->i_isSessionOpen(sm, &ctl))
         {
             aMachines.push_back(sm);
@@ -3046,5 +3046,5 @@
             }
 
-            if (pMachine->getId() == aId)
+            if (pMachine->i_getId() == aId)
             {
                 rc = S_OK;
@@ -3090,5 +3090,5 @@
 
         AutoReadLock machLock(pMachine COMMA_LOCKVAL_SRC_POS);
-        if (pMachine->getName() == aName)
+        if (pMachine->i_getName() == aName)
         {
             rc = S_OK;
@@ -3097,5 +3097,5 @@
             break;
         }
-        if (!RTPathCompare(pMachine->getSettingsFileFull().c_str(), aName.c_str()))
+        if (!RTPathCompare(pMachine->i_getSettingsFileFull().c_str(), aName.c_str()))
         {
             rc = S_OK;
@@ -4005,5 +4005,5 @@
                 // save actual machine registry entry
                 settings::MachineRegistryEntry mre;
-                rc = pMachine->saveRegistryEntry(mre);
+                rc = pMachine->i_saveRegistryEntry(mre);
                 m->pMainConfigFile->llMachines.push_back(mre);
             }
@@ -4098,5 +4098,5 @@
     {
         ComObjPtr<Machine> pMachine;
-        rc = i_findMachine(aMachine->getId(),
+        rc = i_findMachine(aMachine->i_getId(),
                            true /* fPermitInaccessible */,
                            false /* aDoSetError */,
@@ -4110,6 +4110,6 @@
             return setError(E_INVALIDARG,
                             tr("Registered machine with UUID {%RTuuid} ('%s') already exists"),
-                            aMachine->getId().raw(),
-                            pMachine->getSettingsFileFull().c_str());
+                            aMachine->i_getId().raw(),
+                            pMachine->i_getSettingsFileFull().c_str());
         }
 
@@ -4120,5 +4120,5 @@
     if (autoCaller.state() != InInit)
     {
-        rc = aMachine->prepareRegister();
+        rc = aMachine->i_prepareRegister();
         if (FAILED(rc)) return rc;
     }
@@ -4512,6 +4512,6 @@
                     continue;
                 AutoWriteLock mlock(pMachine COMMA_LOCKVAL_SRC_POS);
-                rc = pMachine->saveSettings(&fNeedsGlobalSettings,
-                                            Machine::SaveS_Force);           // caller said save, so stop arguing
+                rc = pMachine->i_saveSettings(&fNeedsGlobalSettings,
+                                              Machine::SaveS_Force);           // caller said save, so stop arguing
             }
         }
Index: /trunk/src/VBox/Main/src-server/xpcom/server.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 51497)
+++ /trunk/src/VBox/Main/src-server/xpcom/server.cpp	(revision 51498)
@@ -105,7 +105,4 @@
 
 /* implement nsISupports parts of our objects with support for nsIClassInfo */
-NS_DECL_CLASSINFO(Machine)
-NS_IMPL_THREADSAFE_ISUPPORTS1_CI(Machine, IMachine)
-
 NS_DECL_CLASSINFO(SessionMachine)
 NS_IMPL_THREADSAFE_ISUPPORTS2_CI(SessionMachine, IMachine, IInternalMachineControl)
