Refactor/networks