Moved IdleState initialization logic to its constructor.