Fixing problems while creating distribution + encapsulate all fields in json object