Refactor status output code.
Merge pull request #7 from bboe/with_status

Refactor status output code.