Remove dupes, clean up outputs, stuff like that.