move initialization code into private method so it can be reused by awakeFromNib as well
add helper function to get generic object from prefs