code reformat
small fixes
removed simplejson dependency