Added support for removing root node with remove function

Fixes #108 by replacing the root with an empty node when the root node is removed.