Added stack visualization and fixed a couple or errors