Initial change over to using Scala instead of Python.

In the long-term, this is going to be far more maintainable.