Moved getters and setters into Preferences class.