refactoring and cleanup message 5