Animation improvements in code

and improved the Grunt file