More cleanup of SaveState

Fixed wrong nextState

Signed-off-by: Jack Huey kitskub@gmail.com
More improvements

Signed-off-by: Jack Huey kitskub@gmail.com