shock-client bug fixes and cleanup; minor server bug fixes