Adds _getLineSafe and spliceLines