fix hash unit tests and check for nulls
fix unitialised pointer access in config
make hash use size_t/uint32_t