cleaned up the cmd and network layers