- the average person, applying contemporary community standards (not national standards, as some prior tests required), must find that the work, taken as a whole, appeals to the prurient interest;
- the work depicts or describes, in a patently offensive way, sexual conduct or excretory functions specifically defined by applicable state law; and
- the work, taken as a whole, lacks serious literary, artistic, political, or scientific value.
This test is still in use today.
Ex post facto has a relatively narrow legal interpretation in the U.S. - essentially, it only means you can't *increase* punishments in a criminal case retroactively. Decreasing punishments is (and should be) fine.
See Calder v. Bull. Note that compulsory sex offender registration is not considered a punishment by SCOTUS.