Expose format()

Fixes #8