Some preparatory work for #7.