Use json instead of simplejson
Clean up indentation code