New tokendefs logic finished.