Further refined tiebreaking rules by allowing multiple behaviors to be selected with #define, created a deep copy of map