Refactored internal state