added a class interface to facilitate conversion of data to NetworkX
ammended init for new imports
moved most supporting functions here
modified to handle fake nodes and grid intersections