Added bfs. Fixed bug with phase ending in executor (wrong order for fuck's sake!)