Created JUnit test for Stack class.

Made a few updates to the stack class based on the tests. Have bugs to
fix.
Stack bug fixes