Use NOMINMAX to avoid conflict with std functions