Refactor applying slug and finishing deploy