Updated stack implementation and interface.