Redo class inheritance; add primefactors