Optimization for prime factors
Implemented more Scala exercises