Refactor TokenElement class