[refs #25] Added some more JS-magic