Clean up determination of hash type