Refactored using .needs-update flag files