Fix bug in setFirst using hashkey attribute 
More scala changes
Added version to JSON format.