Fixed code-breaking bugs for cfg.sh for all base functions (i.e not dispatcher functions) Added test file for cfg function for all base functions (i.e not dispatcher functions)