Some perf tweaks & cleanup

Travis do not seem to like the JS version... any clue why ? _(see the last commit)_