Replaced % with .format
PEPified.
Added print_json()
Formatting issues fixed