Moving the logic of DeleteString into its function, uncommented. To be fully implemented later.