Remove a damn line
Create setPeriodState(), removes duplicate code