Clean up client and server code
Implement /set call

(Currently returns 500, even though it works.)