remove exit(x) calls, they break emscripten.
Signed-off-by: Lucky <lekatahanas@gmail.com>