v8 optimizations & cleanup