refactoring and config changes