cleanup client

- cleaning up some client functions
- preparing for nonce verification