Added Hat class.