Add pop/push command

Targets #330.

Please review and comment.
You can return `-EINVAL` here.