Refactors stack to use EmptyStackException, makes pop's use of remove clearer.