update mouse events +clean js