Support for "resolve" command both on CLI and API (no web)
Initial code cleanup on cluster-tree.js