Changed Cannon Logic to State Machine.