Restructured the code.
Enabled labeling of nodes and edges.