More fixes, approvemap fixes, tons of other things

improved a lot of code, WriteMaps() stuff, new map upload recognition
during races, etc