Introduce Status class and refactoring