Merge pull request #1 from horazont/master

Huge performance boost by avoiding copies
Use dicts for the graph instead of sets
bugfix
Merge pull request #2 from sebastianriese/master

fix RuntimeError in del_vertex
Fix whitespace