cleanup code for clean compile with g++