Moved some things around. Buffer is not passed as argument for TextOrBinary sniffer.