Further improvements to web upload and tidy-up

Further improved web file upload speed
Dealt with Eclipse code analysis warnings
Made some more functions and parameters const-correct