some random stuff from yesterday's stash, hopefully this are petres's javascript changes

don't know if this makes things better or worse, we will find out! :)