Refactored scanning grid classes.