Replace sorted map with slice for HTML attributes

For cleaner code and performance reasons.

See #38
Fixes #39