PLD: refactor deploy template