Refactor code. Make easier to use custom scroll listeners