Added memento routine to extract and restore the full state of a line
Cleanup of the logic and delete character command