Refactor scan in admin GUI