refact append, prepend method and bug fix for tt.isNodeList