Fix inverse behavior of elements smaller than window.width

Elements narrower than the window were scrolling in the opposite direction.
Only keep the elements in `elements` array

This is because the width/height caching that was done before was preventing the page to update it's width when the longest element grew wider.
Merge pull request #5 from iuliux/master

Fix for narrow elements and facilitate width update after initial load.