Using states would probably be your best bet. Why ripe for bugs? As long as you implement it correctly, it should work perfectly fine.
Tal nocodify.com