Refactor y Scan