C++ify globals & config