Moved config reading to getConfig(), moved default* global vars.