More consistent use of PersistenceType instead of stupid ints.