Moved logic for database stats to new file

added data type for parse options. (made parser struct smaller)