Switched from a switch statement to a map for mapping operators to functions.