Fix code formatting using Visual Studio
Use size_t for length variables.