rewrite type traversal, resurrect enum and bitfield support