review code, clean docs, rework TaggedType