Implemented an algorithm to queue scan windows and items.