more cleanup and code comments
dead code removal
sort file names, this will prevent emscripten builds from barfing on load sometimes