Server structure updated

Some changes to the communication with server