Factor out input.