Modified the BFS-BU algorithm to properly use inboxes and outboxes.