removed annoying flickering when scrolled to bottom or top, also started optimising some of the code, still a lot to remove