Refactor viewModel(...) function.
Rename startPos and fillColor properties on history item view model.
Refactor historyItemsDetail(...) function.