Fixed bug in parser where each SQL statement was wrongly assumed to have a single html doc, also created a class for the parser functions and added code to collect some counters of the data