scripts/seen: refactor