Added support for scrollbars
Thanks to Andrew101 for the original implementation