Moved updating to its own file.