Refactoring and I improved the test messages