shift push and pop frame into AOI.hs (for performance, simplicity)