Changed chat to have unique identifier and to store as a hash instead of array.