Added restore template functionality.