fix error clause, and failing aggregate test
add jshint and make lib & test pass; add .editorconfig; add failing pivot test