(a) Within twenty (20) days after the filing of the petition, the prosecuting attorney or the Attorney General shall respond to the petition by answer or motion which shall be filed with the court and served on the petitioner if unrepresented or served on the petitioner's attorney.
(b)
(1) No further pleadings are necessary except as the court may order.
(2) However, the court may at any time prior to its decision on the merits permit:
(A) A withdrawal of the petition;
(B) Amendments to the petition; and
(C) Amendments to the answer.
(3) The court shall examine the substance of the pleading and shall waive any irregularities or defects in form.