More code tidying. Fixed scrolling.