Clean up useless variables, rely more on args.X
Add in removeRedundantEdges, other minor changes that are more pythonic