Introduce context wrapping to a few classes. Add tests for HashStore.