Fixed sorting in CriteriaCalculator
Fixed tests and DatabaseType
Added SizeCriterion