trances now better behaved , although it still does weird things at the bottom of the file. also removed some obsolete commands