Added isStored / isDirty.
Reordered methods.
Replaced type parameter VT with abstract type V.
Changed foreign keys to store Option values.