adding sc_require for system/browser
fixing mistake in sc_require
refactor to prevent too deeply nested try and catch blocks, and make sc_require work correctly