netcode refactoring