Remove unused parameter from and clean up history function.