Finishing code for Factors.

Adding test cases and logic for the prime factor calculation.