Final cleanup

Changes include

* visual improvements for alert messages
* fixing some small inconsistencies in TrendMiner templates
* adding class and method-/function-level docstrings
* some small refactorings for `test_*` and `validators.py` modules
* a couple of small changes based on feedback from `pylint`