Remove unused old formatString functions
Several filename case fixes, a single byte main function, and other minor fixes on non Windows platforms