refactored line property calculation as a class