Deletion of unneeded lines in patch and small cleanup