Refactored prime factors
Added ui for prime factors