tidy deps, move rpc helper into own file
use explain-error