Finished stack class with unit tests.