Add type hints for performance