Some fixes
Work on refactoring the network layer
Refactored a bunch