Refactored LINE and DIAG