Cleaner api & less allocations

Relatively minor changes. Nice tool :)