Add pop/push command

Targets #330.

Please review and comment.
The `-1` is one too many.
Why don't you just `top -= n` and use `top[i]` within the loop? would be much clearer that way.