Remove unused helper function
Minor cleanup
Add a method for applying an animation to elements