This seems to do the job, util.h could use more work
Attempt to make the collector code testable by splitting and exposing it

I can't get this to work, my C-fu isn't quite strong enough and I'm
obviously doing something wrong. Would be nice to do, but for now the
parser *seems* to work well enough, fingers crossed >_>

It'd be nice to expose functions through collector.h, I'll try again
sometime later.
Work on this piece of code later
Oops, need those flags for linking the tests