Updated animation with requestAnimFrame