Error checking + thinking about factorization...