Partial refactor of network client for adding website support.