Goodbye global variables, hello closures :)