Misc cleanups.

- Make the static mapping const.
- Avoid copying map into a vector just to do an index lookup.