Added unit tests and panda dead state.