use realloc to allocate stack
cosmetics
cosmetics
creanup code
add new function 'TEdge'
cosmetics
cleanup code