Random Scala Problems