Implemented death and some bug fixes