Changed how the 'requires' method in the data factory works, so that it can throw a more informative error to the user when a necessary variable is not defined.