Cache some semi expensive values that are looked up on every message.
Merge pull request #3 from ExpediaInc/feature-minor-optimizations

Cache some semi expensive values that are looked up on every message.