[riak-cli] - Refactor code.