makes Parser a class, also makes it so that the constraints aren't
serialized so dumbly.