Refactored out the logic for value equality from the Identity class to it's own generic Value class.