Refactored
Added scala implementation
Converted to Scala and no more XSLT stuff