Added Scala class implementations.