Deletes unrelated stuff from doc