Added a JSON outputting exe
corrected the removal of commas after last item in collection
made a well-formed indentation. Added comments.