Shed some fat from the codebase

Trimmed it down to 72 lines from 93 lines.
Also removed the event handler for resize that isInViewport would
register.
Not required.