Added smooth animation and fixed errors in dynamics