Code cleaning and c++ language update