Warning logic extracted do WarningController class.