cleanup and move more logic out of bin/hashbot