Improve error reporting by running things with debug.traceback as an error handler, and remove custom file loading code with a call to 'require'. Remove some gross code in metamethods, replace with Lua API calls.