extract_reduce: Refactor and fix input signal construction.