bigger scan window and block scanning. some refactorings