Updates activities and their order.