Refactored LineCalc to LineUtil