Major refactor to align with v8 api.  Not quite 100%.