Refactored networking architecture, extracted transport and session layers