Tentatively completed implementation; untested.