Got more of the new layout code not crashing.
Sped up gcode parsing a bit (almost back to what it was).