Refactor and Implement tests. Implement Scala excercises.