get it working with facets and fix lots of bugs in process

also added lodash and jsonfn;  lodash only used for removeAxes with
facets and could easily be removed