Expose more internal to make the unit-test happy

I am not very happy with exposing badly designed internals, but I don't really see how to test it properly otherwise.