Adding more state to dump. Fixing bugs.