Refactoring of notification messages service.