Names of variables enhanced for clarity, old and unused code removed, some changes in the logs and lots of new docstrings.