Clean up code and add auto scroll to top

I removed the below from previous commit