Moved CodeToken delete to an earlier point in time