clean up.
don't use exception.
clean up.
better STMVar usage.
removing warnings.