remove some code lint
remove duplicate edges from NodeBasedGraph
fix short variable names and long lines