Refactor of Notice.php