Added little bit of code to save the pen structure to graphml. Should be reading it instead. Whatever. Will make it work.