Major refactoring using sphere-node-client.