Remove LoopState from being in multiple places