Started to generalize and added a preference helper class.