Some additional refactoring. Waves scroll properly now.