More improvements regarding Gerber2gcode and the optimizer