Implement State Stack system