PHP CS-Fixer applied and some formatting cleanup
additional json format, more README text and some error handling