additional work on alerts module -- includes initial templating refactoring