Fixed a bug where front matter content would be removed and added to the end of the children list. Optimised the findExistingNode method for topics to check the topic type.