Got ready for cmake3 and some minor fixes