scrollbar code cleanup