move scrollbar code to a standalone plugin