fixed some style and broken imports
new line indentation is 4-spaces, switched to httplib objects instead of response codes (same data, just easiear to read)
replace dumps with partial and a default object dumper
updating documentation
updating tests with string enums
'running' state can only be set by the agent