fix a bug, plus remove now unneeded javascript stuff.