refactoring + config defaults