Refactor update server to separate out handling