Add deposit/withdraw methods for concurrency safety. Add unit tests of the thread safety.