Completed the stack implementation.