Cache body element for faster scroll event handler

Some small changes to the scroll event handler that should make it perform a little faster.