Port AIFH2 examples to Scala