implemented results function
moved utils so they are declared before they are used
added mousescroll delta unit test
reduced cyclomatic complexity of several functions