Added animation chain code.