Debug deletelines, updated code