fixed a few final bugs, all tests pass except the supply chains. Getting there