Why do you do all of your requires inside functions? Also is require smart enough not to load the same thing multiple times?