Changed to allow BFS/DFS. Implemented HookableStack and HookableQueue