Added compare and median functions. Added measurement median functions.