Updated code-gen and toString methods in Node/Rel.java