client: move the update code to its own file