3 weeks, it went slowly :(
Hopefully now I can reuse most of the code for other emscripten projects :D