Unit test fixes
Fix id tests
Fix undo tests
Complete update of unit tests