Optimized some of the functions in helpers.js

Also fixes a data-inview aria-hidden bug because the associated helper function was at fault (removed that function since went with more elegant solution).