Completed DataSync logic for client and server.Added javadocs