Aside from some errors encountered popping items incorrectly setting top (pop twice, top is now 0 regardless of items unless now fixed) which I solved by keeping a separate list, the is the issue of the window manager close/back icon.