refactored ComProxy

moved all masking/unmasking code from ComProxy to MaskBuffer/UnmaskBuffer