improve status parsing
fix unittests
Merge pull request #1 from drevilt/master

Thanks. Merged.