Switch some classes to structs to ease GC pressure.  Fixed a few minor formatting issues with tabs/spaces.