code clean up/bug fixes for animations