refactor alerts controller to new module pattern