Implemented the client side of the connection and finalized server