Refactor
Retain list of past keys