Slight refactor and fixed scrolling