Changes to the stack structure and methods.
Added methods to get size of stack and check if the stack is empty.
Fix pop method to check for stack underflow.