Improved n-wise percentage coverage code clarity and added tests.