serverd: finish implementation of basic operations
Fix setRefund bugs in serverd and tools.
serverd: remove debugging output