Added stack implementation.