Scala port of AIFH

Jeff,

This is the full code, my intial port and the some great extra addtions from HairyFotr.
I'm sure there could be more done to make it even neater, but seems ready for PR.