Refactor deploy/initial/update