Refactored HistoryItem for database.