Minor beautification
Use Queue instead of growable List for open and closed sets