Unstable scala

End translation from Java into Scala