Added auto-assign and refactored the auto-updates for maintainability