Refactor network API for 0.6.3 changes.