test & config refactoring