Improve compatibility with newer compilers and unify the aperture interface. This is a source break but the changes should be minor and mechanical. In exchange, this improves support for single consumption of inputs, which is crucial when dealing with borrowed data.