Rework of socket and session handling is now complete