made a class out of SystemOfMeasurement method.

Code is tidier now.