Type conversion, contacts, and surface effects in electroplated CdTe films