Unit conversion

Addresses #212, prerequisites is #213 because the new test reveals the bug described in #209.