Remove useless and Mac-dependent code