Added ability to copy to clipboard
Moved GCode generation into it's own method