Refactors pseudoclassical stack
Refactors pseudoclassical queue