Refactor: Replace oldhistory_handle with structure