Update css and js for smoother transition