Fixed memory leaks and scrollbars now work