renamed and reorganized
added bits and pieces, removed some bugs, let client send actual bytes
to server (and verify result).