Some restructuring.
Corrected a small bug in Measure.getAmount().
Added new tests (#13).