Restructured, new factoring code
yay