Hash creation, minor improvements