Cleaning up code. Working on export to Gephi.