Solved the issue of the edges disappearing behind nodes.

It was just a matter of which order the nodes and links were appended
in.