Minor improvements mostly in style; delete[] is used consistently for new[]