Stack reset.
Use a cache instead of a stack.
WIP