Refactored ID into document.py