Fix pep8 errors except some lines and use json not simplejson