Move code inside the main function and show results in a human readable format
Remove un-neccesasry json encoding/decoding
Add whitespace and PHP_EOL