Minor optimizations in GCode.pm