Fix onResize function to get around A is not a function error.
Correct loop error in memento function
Merge pull request #4 from dethell/master

Correct minor bug in onResize function