Rewrote data structures, simplify, and coalesce