Consider making a modification to line 109 by
setTimeout(function(){this.notify()}, 5000, track);
This adjustment will create a "closure" (function(){this.notify()}) that encapsulates the "this" variable within it, including this.allVarsDefined, which should resolve the error you are encountering.
The issue with your previous code lies in simply extracting the function from the object instance when using "this.notify" and passing it to setTimeout without preserving any reference to the object itself. This approach is adequate if the notify function does not mention "this", but due to its reliance on "this", utilizing a closure is necessary.
For further understanding, I recommend delving into the concept of Javascript closures. You can find valuable insights in this article. Additionally, the book JavaScript: The Definitive Guide 5th Edition by O'Reilly is a highly recommended resource for mastering javascript programming at a reasonable price.
If the suggested solution does not resolve your issue, try simplifying your code to its essential components that you believe should work but are failing, and share it here for further assistance.