clean up js a bit