Before rewriting connection
Fix code to pass compilation
Update server part with serialization