Reorganize a few internals, expose some helper traits