Added checks for unused tokens