(feat) clean up scroll in/out, refactored code and added comments