Use static properties of maps.

Shortens code, adds named return parameters for self-documentation.