Implementation of Stacks.