Refactor network definitions.
Refactor network/component contexts API.