Continued work on rewrite. Crash on adding child nodes because current node is null.