Added test to ensure that mutations to nodes that are no longer part of the tree are not merged in
Added tests for removals
Resolved some issues from code analysis