Added impl and tests.