added a visualize fn for debugging. fixed issue where mergeDuplicates would remove the merged note object