CF-147: Add some explicit type hints
CF-147: Remove unused variables