Implement animation for other browsers and doing some refactoring.