[graphspell][core][js] several syntax and bug fixes (thanks to IllusionPerdu)