Continued work on rewrite. Code no longer crashes, but parent node system is not implemented properly.