disable some debugging output
Fix compile time conflict with Visual Studio's MIN/MAX macros.
Fix use of variable names that shadow function parameters. references #318