refactor
emscripten compilation