Measurement activity fixes & unit tests.