minor fixes and optimizations, added ability to hide scrollbars