Bunyan support

Closes #23 and #32.