[MacPlatform] code cleanup