Fix threephase to not build up infinite stacks
Update StateSteady to use three phase algorithm
Update test cases to actually test & pass