AppendChild should take a Node not Element as per DOM