Initial version of scala port