network refactors
Merge pull request #221 from maraoz/refactor/network

network refactors