Merged halfnelson emscripten fixes