when.js is a way to ensure your code only gets run when the needed variables are available.