Refactoring sliding & window modules