simplify argument parsing and move to a separate module
Simplify some alerts retrieval