diff --git a/geometry/Building.cpp b/geometry/Building.cpp
index f7e30276f90d3cb4e2173ded0968b309d3f109e8..6b7ce4cb463060e2a8dc5372121adfa8259e4165 100644
--- a/geometry/Building.cpp
+++ b/geometry/Building.cpp
@@ -972,7 +972,7 @@ bool Building::IsVisible(const Point& p1, const Point& p2, const std::vector<Sub
      {
           for(auto&& sub: subrooms)
           {
-               if(sub and sub->IsVisible(p1,p2,considerHlines)==false) return false;
+               if(sub && sub->IsVisible(p1,p2,considerHlines)==false) return false;
           }
      }
 
diff --git a/geometry/Line.cpp b/geometry/Line.cpp
index e47fe2a78d7d444b1079f2949bec53e92d44bb52..0d0d3954c7d766ab65e38ad7af8bf55cbdf3fd17 100644
--- a/geometry/Line.cpp
+++ b/geometry/Line.cpp
@@ -263,13 +263,13 @@ bool Line::Overlapp(const Line& l) const
      if(fabs(vecAB.Determinant(vecDC))<J_EPS)
      {
 
-          if( IsInLineSegment(l.GetPoint1()) and  not  HasEndPoint(l.GetPoint1()))
+          if( IsInLineSegment(l.GetPoint1()) &&  !HasEndPoint(l.GetPoint1()))
           {
                //Log->Write("ERROR: 1. Overlapping walls %s and %s ", toString().c_str(),l.toString().c_str());
                return true;
           }
 
-          if( IsInLineSegment(l.GetPoint2()) and not HasEndPoint(l.GetPoint2()))
+          if( IsInLineSegment(l.GetPoint2()) && !HasEndPoint(l.GetPoint2()))
           {
                //Log->Write("ERROR: 2. Overlapping walls %s and %s ", toString().c_str(),l.toString().c_str());
                return true;
diff --git a/geometry/SubRoom.cpp b/geometry/SubRoom.cpp
index 6ba8d49c14b2362002b7322c08bcbad0b987a84f..e75a8bc8d8f8092d1f640635dd810da733cb547e 100644
--- a/geometry/SubRoom.cpp
+++ b/geometry/SubRoom.cpp
@@ -191,7 +191,7 @@ bool SubRoom::AddTransition(Transition* line)
 
 void SubRoom::AddNeighbor(SubRoom* sub)
 {
-     if(sub and (IsElementInVector(_neighbors, sub)==false))
+     if(sub && (IsElementInVector(_neighbors, sub)==false))
      {
           _neighbors.push_back(sub);
      }
@@ -541,7 +541,7 @@ bool SubRoom::SanityCheck()
                     exit(EXIT_FAILURE);
                     //return false;
                }
-               connected=connected or w1.ShareCommonPointWith(w2);
+               connected=connected || w1.ShareCommonPointWith(w2);
           }
           //overlapping with lines
           for(auto&& hline: _hlines)
@@ -562,7 +562,7 @@ bool SubRoom::SanityCheck()
                     exit(EXIT_FAILURE);
                     //return false;
                }
-               connected=connected or w1.ShareCommonPointWith(*c);
+               connected=connected || w1.ShareCommonPointWith(*c);
           }
           //overlaping with transitions
           for(auto&& t: _transitions)
@@ -573,10 +573,10 @@ bool SubRoom::SanityCheck()
                     exit(EXIT_FAILURE);
                     //return false;
                }
-               connected=connected or w1.ShareCommonPointWith(*t);
+               connected=connected || w1.ShareCommonPointWith(*t);
           }
 
-          if(not connected)
+          if(!connected)
           {
                Log->Write("ERROR: loose wall found %s  in Room/Subroom %d/%d",w1.toString().c_str(),_roomID,_id);
                exit(EXIT_FAILURE);
diff --git a/main.cpp b/main.cpp
index 6508a342ca29815a35bd0838f20f054111475078..60f823fb9d354d24f77e0016a4420fd040c7657e 100644
--- a/main.cpp
+++ b/main.cpp
@@ -25,7 +25,7 @@
  *
  *
  **/
-
+#define NOMINMAX
 #include "geometry/Building.h"
 #include "general/ArgumentParser.h"
 #include "./Simulation.h"
diff --git a/pedestrian/AgentsSource.cpp b/pedestrian/AgentsSource.cpp
index 3467a5389d9cef201629df074ea71016f2ebb4ea..4ebaf93f7ab62c6c55f598e8a852b1802170075a 100644
--- a/pedestrian/AgentsSource.cpp
+++ b/pedestrian/AgentsSource.cpp
@@ -93,7 +93,7 @@ void AgentsSource::SetAgentsGenerated(int agentsGenerated)
 
 const double* AgentsSource::GetBoundaries() const
 {
-     return _boundaries;
+     return (_boundaries.data());
 }
 
 void AgentsSource::Setboundaries(double * bounds)
diff --git a/pedestrian/AgentsSource.h b/pedestrian/AgentsSource.h
index 4ed142158c6ca7e2431d9de1b22382fa6c3a151a..39d4d92e73574a8df41edf8c211371aa5fb66396 100644
--- a/pedestrian/AgentsSource.h
+++ b/pedestrian/AgentsSource.h
@@ -33,6 +33,7 @@
 #include <string>
 #include <vector>
 #include <memory>
+#include <array>
 
 class Pedestrian;
 class OutputHandler;
@@ -115,7 +116,7 @@ private:
      int _maxAgents=0;
      int _agentsGenerated=0;
      int _groupID=-1;
-     double _boundaries [4] = {0,0,0,0};
+	 std::array<double, 4> _boundaries = { { 0, 0, 0, 0 } };
      std::string _caption="no caption";
      std::vector<Pedestrian*> _agents;
      std::shared_ptr<StartDistribution> _startDistribution;
diff --git a/routing/GlobalRouter.cpp b/routing/GlobalRouter.cpp
index 518eebc4ae19e7b9acb4eba6af80239504674327..7bc79098fd10de859336c5eabace7e1ae765a7c9 100644
--- a/routing/GlobalRouter.cpp
+++ b/routing/GlobalRouter.cpp
@@ -1082,7 +1082,7 @@ void GlobalRouter::WriteGraphGV(string filename, int finalDestination,
           int room_id = from_AP->GetConnectingRoom1();
           int room_id1=from_AP->GetConnectingRoom2();
 
-          if ( (IsElementInVector(rooms_ids, room_id) == false) and (IsElementInVector(rooms_ids, room_id1) == false) )
+          if ( (IsElementInVector(rooms_ids, room_id) == false) && (IsElementInVector(rooms_ids, room_id1) == false) )
                continue;
           double px = from_AP->GetCentre().GetX();
           double py = from_AP->GetCentre().GetY();
diff --git a/routing/GlobalRouter.h b/routing/GlobalRouter.h
index f3cfde6bb4553adeaf54841c522d38603020a77a..bdd980cc33aaf5135fc021730a0e389239386ec8 100644
--- a/routing/GlobalRouter.h
+++ b/routing/GlobalRouter.h
@@ -29,7 +29,7 @@
 
 #ifndef GLOBALROUTER_H_
 #define GLOBALROUTER_H_
-
+#define NOMINMAX
 #include <string>
 #include <sstream>
 #include <cfloat>
diff --git a/routing/QuickestPathRouter.cpp b/routing/QuickestPathRouter.cpp
index 410c70a5d0c6cf27baab4b3fbb49e71bb3cd5d57..3c1bfdef77ffa74202a06b55605209ba5622f9d7 100644
--- a/routing/QuickestPathRouter.cpp
+++ b/routing/QuickestPathRouter.cpp
@@ -207,7 +207,7 @@ double QuickestPathRouter::TAP (double alpha)
 }
 
 
-int QuickestPathRouter::GetQuickestRoute(Pedestrian*ped, AccessPoint* nearestAP __attribute__((unused)))
+int QuickestPathRouter::GetQuickestRoute(Pedestrian*ped, AccessPoint* nearestAPused)
 {
 
      //int preferredExit=nearestAP->GetNearestTransitAPTO(ped->GetFinalDestination());