
257 P.3d 416 (2011)
2011 OK CIV APP 83
Erick L. REIMERS, Plaintiff/Appellant,
v.
The STATE of Oklahoma, ex rel. DEPARTMENT OF CORRECTIONS and The City of Bethany, Defendants/Appellees.
No. 107,440. Released for Publication by Order of the Court of Civil Appeals of Oklahoma, Division No. 4.
Court of Civil Appeals of Oklahoma, Division No. 4.
February 14, 2011.
Rehearing Denied April 26, 2011.
Certiorari Dismissed June 27, 2011.
*417 Michael S. "Mickey" Homsey, Terry R. McMillan, Homsey & Associates, Oklahoma City, Oklahoma, for Appellant.
David A. Davis, Oklahoma City, Oklahoma, for Appellee City of Bethany.
E. Scott Pruitt, Office of the Attorney General, John D. Hadden, Assistant Attorney General, Oklahoma City, Oklahoma, for Appellee State of Oklahoma Department of Corrections.
JERRY L. GOODMAN, Presiding Judge.
¶ 1 Plaintiff Erick L. Reimers appeals two trial court orders entered in separate cases. Each order is final and presents the same question for our review. Plaintiff was convicted of a sex crime in 1992 and completed all registration requirements of the Oklahoma Sex Offender Registration Act (OSORA), 57 O.S. Supp.1991, §§ 581 through 587 (now 57 O.S.2001 and Supp. 2009, §§ 581 through 590.2), then in effect. The question before this Court is whether Plaintiff must continue to register as a sex offender pursuant to subsequent amendments to OSORA that became effective after he completed his sentence?
¶ 2 We answer the question in the negative, but in doing so we need not address Plaintiff's argument that the amended statute is an unconstitutional ex post facto law. We hold that under the specific facts of this case, OSORA does not apply to this Plaintiff because the amendments are substantive in nature and not merely procedural. Finding no legislative intent to retroactively apply a substantive change in the law, Plaintiff is entitled to the relief sought.
¶ 3 In this appeal, No. 107,440, we address Plaintiff's request for injunctive and declaratory relief. In the second appeal, No. 108,070, issued this date, we address Plaintiff's request for monetary damages arising from attempts to enforce OSORA's amendments against him.

PROCEDURAL BACKGROUND
¶ 4 Plaintiff filed a petition in Oklahoma County District Court on March 18, 2009, in case number CJ-2009-2610. He sought to temporarily and permanently enjoin defendants Department of Corrections (DOC) and City of Bethany (COB) from enforcing provisions of OSORA. He also sought to prevent the publication of any information regarding his status as a registered sex offender and sought a declaration that OSORA's amendments were an ex post facto law or bill of attainder, and therefore unconstitutional.
¶ 5 DOC and COB filed motions to dismiss Plaintiff's claim on procedural and substantive grounds. At the hearing on those motions the parties' arguments mainly addressed the substantive issue, i.e., whether the amendments to OSORA created ex post facto laws. Subsequently, the trial court dismissed Plaintiff's suit without stating its reason. That order, filed July 28, 2009, is the subject of this opinion,
¶ 6 On September 1, 2009, Plaintiff filed a second suit in Oklahoma County, Case No. CJ-2009-8268, in which he sued DOC, COB, and Sharon Cadle, a police officer employed by COB (collectively, Defendants). Plaintiff again alleged the amendments to OSORA created unconstitutional ex post facto laws, *418 and alleged various tort claims against all Defendants. All of the tort claims arose from Defendants' attempts to enforce the amendments to OSORA's registration requirements against Plaintiff. A motion to dismiss was filed, which the trial court treated as a motion for summary judgment. After a hearing it granted and entered judgment in favor of all Defendants. That order, filed February 6, 2010, was appealed in No. 108,070, which we treat as a companion case and issue a separate opinion on this date.

FACTS
¶ 7 Plaintiff's petition states that in 1992 he was charged with indecent exposure pursuant to 21 O.S.1991 and Supp.1996, § 1021(A)(1), (now 21 O.S.2001 and Supp. 2008, § 1021(A)(1)). He pled guilty to the charge and received a five-year suspended sentence. He successfully completed all the terms and conditions of his five-year sentence including the successful completion of DOC's sex offender treatment program.
¶ 8 At the time of his conviction, 57 O.S.Supp.1989, § 503(C) required convicted sex offenders who had successfully completed DOC's sex offender treatment program to register with DOC (but not with a local municipality) for two years following their date of discharge from DOC supervision. Repeat offenders, and those who did not complete DOC's treatment program, were required to register for ten years.
¶ 9 Plaintiff completed his sentence in 1997, and registered as a sex offender for two more years. He has not registered since 1999. He moved to Bethany, Oklahoma, and lives in a home located less than 2,000 feet from a school. The subsequently amended § 590 of OSORA prohibits persons subject to its provisions from living within 2,000 feet of a school.
¶ 10 In 1997, the year Plaintiff completed his sentence, and the first year he registered as an offender, OSORA was amended to require all offenders to register with DOC for ten years, and additionally, to register for five years with the local law enforcement agency having jurisdiction over an offender's intended place of residence. The provisions reducing the length of registration for completion of an offender treatment program were stricken.
¶ 11 In its current version, § 583(C)(1) and (D)(1) each require a level one offender (such as Plaintiff) to register with DOC and local law enforcement for 15 years following the completion of their sentence. The length of time required to register is now dependent upon the "level" of offence. A level one designation is given to an offender who is considered a lower risk or danger to the community and because he is not likely to repeat such offense. A level three classification represents a higher risk or danger to the community because the offender is likely to commit repeated offences. See, 57 O.S.2001 and Supp. 2009, § 582.5(C).
¶ 12 On September 17, 2007, Plaintiff was charged with failing to register as a sex offender, but this charge was dismissed on January 24, 2008.[1] On January 25, 2008, a judge of the Oklahoma County District Court entered an "Order Clarifying Sex Offender Status" in Plaintiff's original criminal case which declared Plaintiff's requirement to register as a sex offender terminated in 1999 when two years elapsed following the completion of his sentence.[2]
*419 ¶ 13 On April 14, 2008, Cadle, a police department employee of COB, mailed Plaintiff a letter demanding he move from his residence and register as a sex offender or face another charge of failure to register.
¶ 14 Plaintiff refused these demands, hired counsel, and demanded all information regarding his status be removed from COB and DOC databases, citing as authority the trial court's 2008 Order Clarifying Status. Plaintiff also filed an administrative grievance with DOC on May 12, 2008. This grievance was denied causing Plaintiff to pursue a timely administrative appeal of the denial.
¶ 15 Plaintiff's demands were denied. DOC notified Plaintiff by letter that the registration requirements applied to him and that DOC believed the trial court's Order Clarifying Status was void because registration was a civil matter and administered by DOC, not by the courts, and as a result, the trial court had no subject matter jurisdiction to enter the order.
¶ 16 On May 29, 2008, COB's employee, Cadle, submitted an affidavit of probable cause with the Oklahoma County District Attorney's office causing the latter to file a second charge against Plaintiff for failing to register and for living within 2,000 feet of a school. On January 13, 2009, these charges were dismissed when Plaintiff agreed to register. In a letter from another counsel to the District Attorney dated April 17, 2008, Plaintiff agreed to register and to move his residence, asking for six weeks in which to do so.
¶ 17 However, he did not do so. Instead, Plaintiff filed suit, seeking declaratory and injunctive relief requesting COB and DOC be enjoined from disseminating any information about him and that OSORA, as amended, be found unconstitutional because it was either an ex post facto law or bill of attainder.
¶ 18 The trial court held a hearing on April 30, 2009, taking the matter under advisement. Its order, filed July 23, 2009, reflects that the parties presented their positions on the undisputed facts and the issue was a purely legal one. It granted DOC's motion to dismiss and sustained COB's objections.
¶ 19 The trial court's letter ruling states the court found Smith v. Doe, 538 U.S. 84, 123 S.Ct. 1140, 155 L.Ed.2d 164 (2003), and Oklahoma Attorney General Opinion 2004 AG 24, persuasive. These authorities addressed the ex post facto issue. Responding to Plaintiff's request for findings of fact and conclusions of law, the trial court, lacking independent recollection of the rulings made at the hearing, adopted the transcript of the April 30 hearing as its findings. The order concluded by denying Plaintiff's petition for injunction, declaratory relief, or a restraining order, and entered judgment for DOC and COB, with costs awarded to Defendants. Plaintiff appeals.

STANDARD OF REVIEW
¶ 20 The trial court granted DOC's motion to dismiss. A motion to dismiss for failure to state a claim will not be granted, nor will a petition be dismissed for failure to state a claim unless it appears beyond doubt that the plaintiff can prove no set of facts in support of his claim which would entitle him to relief. Frazier v. Bryan Mem'l Hosp. Auth., 1989 OK 73, ¶ 13, 775 P.2d 281, 287. The review of a motion to dismiss involves a de novo consideration of the petition to determine the legal sufficiency of the claim.
¶ 21 Permitting a defective pleading to be amended before pronouncing final judgment is a statutory prerequisite. However, an exception applies when, as in this case, the facts are uncontroverted and the dismissal is based on a pure question of law. The interpretation of a statute and its application is a question of law which we review de novo. State ex rel. Oklahoma State Dept. of Health v. Robertson, 2006 OK 99, ¶ 6, 152 P.3d 875, 877-78.

ISSUE
¶ 22 The narrow issue is this: Is Plaintiff required to comply with OSORA's amended sex offender registration requirements that were not in effect and substantially changed after he completed his sentence for a sex crime? Stated differently, if Plaintiff complied with all the statutory registration requirements in effect at the time of his sentencing, is he now required to comply with additional registration and publication requirements *420 that did not exist at the time he completed his sentence? Or, as Plaintiff argues, did the amendments create unconstitutional ex post facto law or bill of attainder?

ANALYSIS
¶ 23 We must first address two procedural issues raised by both parties. First, DOC contends it (and by extension, COB) are improperly named as parties in this suit.

Improper Parties
¶ 24 DOC contends this appeal should be dismissed because Plaintiff has not sued the proper parties. Plaintiff's suit names DOC and COB, as political subdivisions, as defendants. He names no individuals.[3] According to DOC, because Plaintiff seeks to compel those political subdivisions to act (delete his name from the database) and to enjoin them from other acts (compelling Plaintiff to register or move under threat of prosecution) it is necessary for Plaintiff to name an individual agent of DOC or COB to be enjoined or compelled to act. We disagree. We find DOC and COB are proper parties to this suit and Plaintiff's suit may proceed.

Effect of Trial Court's Order Clarifying Status
¶ 25 Next, Plaintiff argues the trial court's 2008 order Clarifying Sex Offender Status was effectively and erroneously nullified by the order now under review. Plaintiff contends the order Clarifying Sex Offender Status was final and conclusive regarding the necessity of Plaintiff to continue registering under the revised OSORA requirements. Plaintiff argues the order was never appealed, became final, and he is entitled to rely upon it as a vested or accrued right. Timmons v. Royal Globe Ins. Co., 1985 OK 76, ¶ 13, 713 P.2d 589, 594.
¶ 26 In response, DOC states that the only provision of OSORA which contemplates a judicial determination is found in 57 O.S.2001 and Supp. 2009, § 582.5(D), which states:
D. The sex offender level assignment committee, the Department of Corrections, or a court may override and increase the level assignment only if the entity:
1. Believes that the level assignment assessed is not an accurate prediction of the risk the offender poses to the community; and
2. Documents the reason for the override in the case file of the offender.
Provided, in no event shall the sex offender level assignment committee, the Department of Corrections, or a court override and reduce a level assigned to an offender as provided in subsection C of this section.
(Emphasis added.)
¶ 27 According to DOC, nowhere else in OSORA has the Legislature included any provisions permitting a court to modify or alter the terms of OSORA as it applies to one coming under its ambit. OSORA, so argues DOC, is a civil regulatory act, not a criminal statute, and therefore a court cannot, as part of its sentencing or review of a criminal conviction, limit OSORA's applicability to a defendant. DOC concludes the trial court had no authority to enter the order it did, and claims it cannot be bound by the order, nor can Plaintiff rely on it to prevent registration.
¶ 28 We agree with DOC that it is not bound by the trial court's order, and that Plaintiff may not use this order as authority for not registering. The trial court's order Clarifying Sex Offender Status in Plaintiff's criminal case merely stated its opinion regarding the law in effect at the time and its application to Plaintiff based on that current law. The trial court did not have proper jurisdiction of the subject matter or parties to render what was essentially a declaratory judgment regarding the validity of the Act.

Constitutionality of OSORA
¶ 29 As stated earlier, we need not address Plaintiff's broader argument that OSORA is unconstitutional. Instead, we recast Plaintiff's argument and simply address the issue of whether OSORA is applicable to him. We hold it is not.
We do not reach, either for settlement or discussion, the equal protection clause's *421 impact. When, as here, legal relief clearly is affordable upon alternative grounds, consideration of constitutional challenges is inappropriate in light of our self-erected "prudential bar" of restraint. Constitutional questions should not be reached in advance of strict necessity.
Russell v. Board Of County Commissioners, 1997 OK 80, ¶ 32, 952 P.2d 492, 504 (footnote omitted).
¶ 30 Instead, we examine the amendments to determine if they represent substantive or procedural changes to existing law. If those changes represent substantive changes to existing law, they cannot be retroactively applied absent an express Legislative intent.
¶ 31 This issue has recently been addressed by the Oklahoma Court of Criminal Appeals in an unpublished summary opinion styled State v. Smith, Appeal No. S-2009-944 (October 28, 2010). We find that Court's analysis erudite and persuasive. A statute must be given retroactive effect before it can violate the prohibitions against either ex post facto laws or bills of attainder. Unless the Legislature clearly expresses otherwise, intervening changes in the law are applied prospectively only, effective on the date of their enactment.
Statutes are typically not given retroactive effect unless the Legislature has made its intent to do so clear. Any doubts must be resolved against a retroactive effect. Crawford v. Guardian Life Ins. Co., 1997 OK 10, ¶ 8, 954 P.2d 1235, 1238. . . .
CNA Ins. Co. v. Ellis, 2006 OK 81, ¶ 13, 148 P.3d 874, 877.
Remedial or procedural statutes may operate retrospectively only where they do not create, enlarge, diminish or destroy vested rights. A substantive change that alters the rights or obligations of a party cannot be viewed as solely a remedial or procedural change and cannot be retrospectively applied. Welch v. Armer, 1989 OK 117, ¶¶ 27-28, 776 P.2d 847, 850. Because amended title 23, § 72 increases the potential damages from three times the actual damages to include up to ten times the actual damages, the amendment cannot be viewed as merely a remedial or procedural change. The statute alters the liability of a defendant making the wrong potentially more costly. In addition, nothing in the statute reveals a legislative intent that it be retroactive. . . .
Sudbury v. Deterding, 2001 OK 10, ¶ 19, 19 P.3d 856, 860.
¶ 32 A review of OSORA reflects no clear legislative attempt to apply the laws retroactively. The 1991 version of OSORA in effect at the time of Plaintiff's conviction, and all versions of OSORA enacted since that time, clearly state an effective date from which OSORA would be prospectively applied.[4] There are no statements by the Legislature that the provisions shall be retroactive. Further, a review of the amendments to OSORA show they are substantive as applied to this Plaintiff. If applied, they would require him to register for an additional length of time beyond that required of him when he was sentenced. We therefore hold the OSORA amendments are substantive, and cannot be applied to this Plaintiff retroactively. We do not address OSORA's constitutionality.
¶ 33 Plaintiff is entitled to judgment on his actions below to compel DOC to remove him from the offender data base, and COB is enjoined from further actions against Plaintiff arising from these facts.
¶ 34 REVERSED.
GABBARD, J., and RAPP, J., concur.
NOTES
[1]  The District Attorney, in a letter dated April 10, 2008, gave two reasons for the dismissal. First, because Plaintiff did register for two years as required by the statute in effect at the time and did complete the sex offender treatment programs. Second, the District Attorney believed at the time the amended statute was not to be applied retroactively because it "withdrew previous benefits [Plaintiff] obtained from completing sex offender treatment." The District Attorney now concluded, upon further study, that that belief was "incorrect and . . . the sex offender registration law is retroactive." However, the District Attorney stated it would not refile the charges, but Plaintiff must comply with OSORA.
[2]  The January 25, 2008, Order states in part: "[T]he Court finds that the Defendant has fully satisfied the requirements [of OSORA] by completing sex offender treatment and finds that the registration requirements thereunder terminated. . . on November 17, 1999 as to [DOC] and November 17, 2002, as to the city in which he resided . . .". This order was entered in Oklahoma County case no. 1992-4363 and neither DOC or COB were parties to or given notice on that case.
[3]  But see Opinion No. 108,070.
[4]  Section 582 of OSORA, as amended, titled "Applicability of Act" states in relevant part:

A. The provisions of the Sex Offenders Registration Act shall apply to any person residing, working or attending school within the State of Oklahoma who, after November 1, 1989, has been convicted, whether upon a verdict or plea of guilty or upon a plea of nolo contendere, or received a suspended sentence or any probationary term, or is currently serving a sentence or any form of probation or parole for a [listed sex offence].
B. The provisions of the Sex Offenders Registration Act shall apply to any person who after November 1, 1989, resides, works or attends school within the State of Oklahoma and who has been convicted or received a suspended sentence at any time in any court . . . . . . to commit a crime.
