remove most C++-isms