Js/animation/smoothstate optimisations