Cleaned up the v8 code a bit.