made autoscroll work better with images and code cleanup
Merge branch 'master' into feature