[HistoryView] Declare local variables at top of functions
[HistoryView] Remove a needless brace