Some python common code from RF.

Also, some experiments with Scala.