Refactor MarginMeasure calculations for axes