add Gc section
Write box section, and various
other small improvements
Fix errors