Clean up scroll callback
Handle window resizing
Support scrolling by dragging the scrollbar
Fix indentation
Restore previous position on refresh

For some reason Firefox always goes to the beginning after refreshing...