Sorted out some more arrival stuff + fixed code I hadn't tested.