Component part of #266.