MOD: refactor client code, fix client send callback method