Implement maxHistory
Adds failing test