The superego acts in many ways like the ego, as a moderator of behavior; but whereas the ego moderates urges based on social constraints, the superego operates as an arbiter of right and wrong. It moderates the id's urges based on a moral code.