Refactor to make plog API truly usable

We should be able to write filters out-of-tree with this.