Updated v8 engine. Cleaned up and unified v8 code by adding helper macros. Fixes #5