Added some more tests. Fixed bugs in measure conversion.