Better styling for exports modal. Refactored code and added testing.
Be more tolerant of what we consider to be scrolled to bottom. Issue: #647