Remove unused variables.
Make the history unit test date independent by adding a date object mock.