Added gcode functionality. Added osx support.