Use static properties of maps.

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/nbio/httpcontext/1)
<!-- Reviewable:end -->