Refactor the commonmark converter class

Addresses #26.