Improved thread safety

Altered the internals to replace @hash rather than modify it. This will ensure
that get operations never happen on a hash that is being modified so no lock is
required.