small refactors in shell, normalized and scatter js