Fix warning
Remove some duplication
Remove ancient replicator hack (that is no longer needed since we now have
separate events for approve and unapprove)
Remove duplicate setting of the same key