fixed bugs, optimization
Merge branch 'master' of github.com:gabre/networks