changed randguard to a 32 bit int
Fixed formatting issues