I slightly refactored the line element module.