Code clearing
This merge request intends to improve the code readability, simplifying function calls, avoiding code duplication and removing superfluous or duplicated calculation steps.
The architecture and processing algorithms are not changed.
Edited by Benjamin Weyer