add attributes
add replaceChild test
remove unused functions
remove unused functions isNode
add jsdoc
add comments and refactor diff method