merged Scala implementation into designated infrastructure

I should probably have used a topic branch, it is a bunch of commits now. Hope you still find it useful.