Scala syntax fixes