Added aggregate measurements and trivial fixes