add test cases I also have in the website
stop using scrollTop/scrollLeft as my tests looked not good in FF and Chrome. Some small refactoring.