big move, move all extern variables to config.h