Move error locations management down to state