Rename `key` to `name`. Prioritize `opts.name`

Fallback to `opts.key` if `opts.name` does not exist.

Fixes #8