Beginning of function destroyLines