cleanup platform dependend code