made require optional, it now falls back to globals. Updated tests to not use require.
added component.json and package.json