重构StateStack和Navigation