Minor refactoring to introduce convenience method

See #33.