Implemented dead state
Implemented level end state