why not have it in js everything
some cosmetics / var stuff
get rounding right, removeNode doesn't work
some check