Refactored updating files a bit so it's easier to invoke.