Refactoring to create announcement box