TESAME is a tool that removes unnescesary edits from your mod. A mod with unwanted edits is called "dirty" and a mod without those edits is called "clean".
When you open the plugin with the program you will see a list of objects, scripts, and such. These objects were all either:
a) Altered by you,
b) Not altered by you, but the CS marked them as altered;
c) Something that is not a part of any of the master files.
Here's how to clean:
If you see any object(s) that are part of either the Morrowind, Tribunal or Bloodmoon master files, you should highlight those object(s) by selecting them from the list and hitting the space bar, then you should go to items in the top toolbar and hit "Delete." Doing this to objects in master files WILL NOT delete them from the plug-in. It will only remove that "Changed" status and remove any changes you might have made to that object. The exception to this rule is land textures (LTEX); never delete any textures from your mod, or they will be removed from the game when your plugin is loaded.
If you see anything that is not a new object ID that you made yourself (such as a custom chest, crate, etc.) or an old (vanilla or TR) object that you have purposedly edited, you should clean it.
Then when you are done cleaning, just hit "Save As." Remember to save it with a different name if you wish to avoid confusion with file versions. Make sure to check your "cleaned" version to make sure everything is still how you want it. Remember though, that if you make any more changes to the cleaned version in the CS, you may have to clean it again.
Also, never hit "sort" if you are going to be working with Cell or Landscape references or with Dialogue. Doing this will cause you to lose which Landscape reference goes with each Cell reference (they are paired) or which Topic name (DIAL) goes with which dialogue entries (INFO).
You should always clean cells that do not belong to you. Furthermore, coordinates of cells do not appear in TESAME. Therefore, you should always name your exterior and interior cells so that you can recognize them in TESAME and know not to clean that cell. Or, alternatively, you can use the Esp-QuickEditor to delete exterior cells by their coordinates. Another thing to remember is that usually, if you opened a cell, it will be "dirtied" and appear in the list. Certain cells have a tendency to be marked as changed by the CS for unknown reasons when saving, so look for those too. Just remember that with cells, clean everything that shouldn't be a part of the plug-in.
As a side note, make sure not to delete the first entry in the list in TESAME, the one that says "TES3." That is what your plugin uses to recognize itself as a TES3 plugin.
Warning: use TESAME to clean out dialogue that originally belongs to other files only; do not use TESAME to delete dialogue entries you have created yourself. Aside from specific cases, any dialogue deletions from your own plugin should be done in the Construction Set – if done in TESAME, the rest of your dialogue can end up out of order by losing its reference positions.
Whenever you insert new dialogue lines in a Greeting or in a topic that already existed, the lines above and below will be marked as "edited" and will be included in your plugin (an asterisk * will appear automatically on the line below; it will not automatically appear on the line above if you don't click on it, but that one will be edited too regardless - CS dialogue tip: you can always jump to the first edited line in the list by pressing * like with any other letter, and you can select edited lines by text by pressing space after * and then letter keys as usual). You will need to clean them. A trick you can use to keep track of which lines you will need to clean is to replace their text with something easily identifiable.