Finish implementation of BufferedStack, correct all bugs