Refactor to make testable under CI.
Suppress unused.