Fixed ResponseExtractor to return the exit code of the CommandState that is Done instead the first one. Fixes #79.
Cleaned up unused imports.