Modernize C++11. Use few more nullptrs and for(a:b) loops.