Build history tokens

I wasn't sure to understand #464 so I did this.

@danielkaneider Is that what you had in mind?