Bits and pieces of Scala code