Change string-based approach of creating <symbol> elements to a more object-based approach using cheerio.

This change is for better readability and maintainability of the code and does not noticeably impact the speed of the task.