Require modules up front, not in the middle of runtime
Merge pull request #998 from iangreenleaf/fix_require

Require modules up front, not in the middle of runtime