Fixed memory issue and implemented player health and death