Increased the thrwshold for naive factorization
Moved test code to a new class, to allow for cleaner commits