Switched to using textContent and added appendChild