C and C++ improvements, some ideas from FBSD wiki