Reapply DEP-0007 implemenation, tests, and documentation.