Updated tests to work with animation and fixed algorithm bug where previously set equalSize wasn't removed before comparing elements again.
Fixed typos in test
Changed test into self executing function