Added local variables for key, token and list