Rudimentary text cleaner in C