Removes decode test code and makes nextState local everywhere