Add a safe wrapper to require files.

Fix some style problems.