Moved alerts views, functions into separate module