Split out common functions into different modules.
Redo prime factorization in problem 3.