Refactored and redesigned State-Handling