Refactored status to state

seperate task and node states