cleanup js a bit