Added density calculation to hash procedure
Fixed more bugs in halo, almost working correctly