Some code beautified
Updated main to iterate through all measurments