Bug fix when Smspilot returns body['error'] == '0'.
Refactoring.
Merge branch 'MILI-498'