Added exceptions to pop() and top() methods. Closes #001