more cleanup. cfg files refined.
got all functions working with new vars and function names