added prune-children! do cleanup nodes with no children. made abstract to allow for easy reuse.