Add sensible default for :name key.

Also adds a few unit tests.

Closes #8