var htmlparser2 = require("htmlparser2"),
    Parser = htmlparser2.Parser,
    Handler = htmlparser2.DomHandler,
    CSSselect = require("../../");

module.exports = {
    CSSselect: CSSselect,
    getFile: function(name) {
        return module.exports.getDOM(
            require("fs")
                .readFileSync(__dirname + "/docs/" + name)
                .toString()
        );
    },
    getDOM: function(data) {
        var h = new Handler({ refParent: true, ignoreWhitespace: true }),
            p = new Parser(h);

        p.write(data);
        p.end();

        return h.dom;
    },
    getDefaultDom: function() {
        return module.exports.getDOM(
            "<elem id=foo><elem class='bar baz'><tag class='boom'> This is some simple text </tag></elem></elem>"
        );
    }
};

@@ -39,79 +39,8 @@
 %22),%0A
-    Parser = htmlparser2.Parser,%0A    Handler = htmlparser2.DomHandler,%0A
     
@@ -161,34 +161,33 @@
  return 
-module.exports.get
+htmlparser2.parse
 DOM(%0A   
@@ -330,199 +330,28 @@
 OM: 
-function(data) %7B%0A        var h = new Handler(%7B refParent: true, ignoreWhitespace: true %7D),%0A            p = new Parser(h);%0A%0A        p.write(data);%0A        p.end();%0A%0A        return h.dom;%0A    %7D
+htmlparser2.parseDOM
 ,%0A  
@@ -399,26 +399,25 @@
 urn 
-module.exports.get
+htmlparser2.parse
 DOM(

use htmparser2's parseDOM method