Prime Factors kata refactor