Adding line deletion logic.