New code

New API for the server and the latest code that Miguel sent me on 6th
July