Adds support for easily creating custom preferences for models