Fix, document and enforce API algebra.