I. The commissioner shall maintain the youth services center for such purposes as the commissioner shall determine, which may include, but are not limited to, the purposes described in RSA 621-A:5.
   II. The commissioner shall adopt rules under RSA 541-a relative to:
      (a) The discharge of any child admitted to the center when further detention is either unnecessary or undesirable.
      (b) The return of the child to such custody as may be determined appropriate or as ordered by the court.