Added initializedead and fixed some errors.