Fix compile-dll script, improve others, etc