CS
Add missing type hinting
Small refactor
Refactoring to fix code duplication