Refactoring status handling to fix bugs.
v0.2.1