Adding json output
Some documentation added