Added viewportSize from Tyson Matanich for more accurately returning the viewport's width