Fixed dequeueing in the BFS algorithm
Changed the BA model implementation for debugging the BFS algorithm