Added dynamic allocation for avl_nodes.
Added memory management for node mappings.
Added partial support for dynamic segments.
Completed dynamic memory allocation.