adding files missing in previus commit. They include database abstaction layer Output format and a rearaing of the allCombination caluctaor and the all rules apply function