refactored config
refactoring and code cleanup
more config rerfactoring
more config refactoring and more config unit tests