some more splitting of client library, cli and qtclient