Cleanup code around multiple required files (thanks @d11wtq!)