Refactor: Static type checking, linting and formatting
Using mypy and ruff. To be integrated automatically via the CI/CD pipeline.
task