chg: more checks for one to one correspondence of bi. factors and multi. factors
fix: need to map down co-factors
fix: need to check for divisibility
fix: wrong choice of main variable
fix: prevent factors from being reordered
Merge pull request #604 from mmklee/bug_fix

Bug fix