minimize (and fix) js specs